Package: tla-load-dirs
Version: 1.0.28
Severity: normal
Tags: patch

tla-load-dirs doesn't support importing a first (base-0) revision,
while this is a useful feature. All it has to do is issue "tla import"
instead of "tla commit" then. Patch doing that included.

Steps to reproduce:

 tla archive-setup foo--bar--0
 tla init-tree foo--bar--0
 tla_load_dirs ~/quux/

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-amd64-k8-smp
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)

Versions of packages tla-load-dirs depends on:
ii  load-dirs-common              1.0.28     Common files for tla-load-dirs and
ii  python2.3                     2.3.5-9    An interactive high-level object-o
ii  tla                           1.3.3-3    arch revision control system

tla-load-dirs recommends no packages.

-- no debconf information
diff -uN --recursive tla-load-dirs-1.0.28/debian/changelog 
tla-load-dirs-1.0.28.0/debian/changelog
--- tla-load-dirs-1.0.28/debian/changelog       2005-09-06 17:14:58.000000000 
+0200
+++ tla-load-dirs-1.0.28.0/debian/changelog     2006-01-28 05:39:49.000000000 
+0100
@@ -1,3 +1,10 @@
+tla-load-dirs (1.0.28.0) unstable; urgency=low
+
+  * tla/baz: Do an import instead of a commit when the current
+    tree-version has no logs (closes: #TODO)
+
+ -- Lionel Elie Mamane <[EMAIL PROTECTED]>  Sat, 28 Jan 2006 05:39:49 +0100
+
 tla-load-dirs (1.0.28) unstable; urgency=low
 
   * Applied patch from Teemu Ikonen to support baz.  Closes: #322622.
diff -uN --recursive tla-load-dirs-1.0.28/tla_support/commandver.py 
tla-load-dirs-1.0.28.0/tla_support/commandver.py
--- tla-load-dirs-1.0.28/tla_support/commandver.py      2005-09-06 
17:14:58.000000000 +0200
+++ tla-load-dirs-1.0.28.0/tla_support/commandver.py    2006-01-28 
05:52:21.000000000 +0100
@@ -71,6 +71,7 @@
     update = 'update --in-place .'
     replay = 'replay --in-place .'
     commit = 'commit'
+    importcmd = 'import'
 
 class Tla11:
     tagging_method = 'id-tagging-method'
@@ -80,6 +81,7 @@
     update = 'update'
     replay = 'replay'
     commit = 'commit'
+    importcmd = 'import'
 
 class Tla13:
     tagging_method = 'id-tagging-method'
@@ -89,6 +91,7 @@
     update = 'update'
     replay = 'replay'
     commit = 'commit'
+    importcmd = 'import'
 
 class Baz14:
     tagging_method = 'id-tagging-method'
@@ -98,6 +101,7 @@
     update = 'update'
     replay = 'replay'
     commit = 'commit'    
+    importcmd = 'import'
 
 class Darcs:
     tagging_method = None
diff -uN --recursive tla-load-dirs-1.0.28/tla_support/tla_wc.py 
tla-load-dirs-1.0.28.0/tla_support/tla_wc.py
--- tla-load-dirs-1.0.28/tla_support/tla_wc.py  2005-09-06 17:14:58.000000000 
+0200
+++ tla-load-dirs-1.0.28.0/tla_support/tla_wc.py        2006-01-28 
05:54:40.000000000 +0100
@@ -146,7 +146,10 @@
                            "--logfile", self.logfn,
                            "--delete-logfile"])
         else:
-            util.chdircmd(self.wcpath, util.safeexec, tlacmd, [cmd().commit])
+            if len(util.chdircmd(self.wcpath, util.getstdoutsafeexec, tlacmd, 
['logs']))==0:
+                util.chdircmd(self.wcpath, util.safeexec, tlacmd, 
[cmd().importcmd])
+            else:
+                util.chdircmd(self.wcpath, util.safeexec, tlacmd, 
[cmd().commit])
         
     def slashstrip(self, *args):
         retval = []

Reply via email to