largefiles: fix the directory structure when archiving a subrepo in a subrepo
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 18 Jun 2012 23:02:51 -0400
changeset 17106 4d0e81dca75f
parent 17105 7d45730ea1b8
child 17107 dcac72c9efb2
largefiles: fix the directory structure when archiving a subrepo in a subrepo Previously, a repo consisting of main/sub/subsub archived sub and subsub as siblings under main.
hgext/largefiles/overrides.py
tests/test-subrepo-deep-nested-change.t
--- a/hgext/largefiles/overrides.py	Sun Jun 17 21:57:48 2012 -0400
+++ b/hgext/largefiles/overrides.py	Mon Jun 18 23:02:51 2012 -0400
@@ -850,7 +850,7 @@
 
     for subpath in ctx.substate:
         sub = ctx.sub(subpath)
-        sub.archive(ui, archiver, prefix)
+        sub.archive(ui, archiver, os.path.join(prefix, repo._path) + '/')
 
 # If a largefile is modified, the change is not reflected in its
 # standin until a commit. cmdutil.bailifchanged() raises an exception
--- a/tests/test-subrepo-deep-nested-change.t	Sun Jun 17 21:57:48 2012 -0400
+++ b/tests/test-subrepo-deep-nested-change.t	Mon Jun 18 23:02:51 2012 -0400
@@ -125,8 +125,8 @@
   ../archive_lf/sub1/.hgsub
   ../archive_lf/sub1/.hgsubstate
   ../archive_lf/sub1/sub1
-  ../archive_lf/sub2
-  ../archive_lf/sub2/large.bin
-  ../archive_lf/sub2/sub2
+  ../archive_lf/sub1/sub2
+  ../archive_lf/sub1/sub2/large.bin
+  ../archive_lf/sub1/sub2/sub2
 
   $ cd ..