Work around the extra output of `tla file-find` to get path.
authorW. Trevor King <wking@drexel.edu>
Tue, 19 Jan 2010 13:59:18 +0000 (08:59 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 19 Jan 2010 13:59:18 +0000 (08:59 -0500)
Example output:
  * build pristine tree for ...--patch-1
  * from import revision: ...--base-0
  * patching for revision: ...--patch-1
  ./{arch}/++pristine-trees/...--patch-1/./.be/unlikely id

libbe/storage/vcs/arch.py

index b7f4d369c0f2da2d32a8a66db294619f9b85d584..f9b01fdd10bd790797fad4a28c3abdc78d338477 100644 (file)
@@ -303,7 +303,8 @@ class Arch(base.VCS):
             status,output,error = \
                 self._invoke_client(
                 'file-find', '--unescaped', path, revision)
-            relpath = output.rstrip('\n')
+            relpath = output.rstrip('\n').splitlines()[-1]
+            print >> sys.stderr, 'getting', relpath
             return base.VCS._vcs_get_file_contents(self, relpath)
 
     def _vcs_path(self, id, revision):