largefiles: download missing subrepo revs when archiving stable
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 23 Sep 2012 00:08:13 -0400
branchstable
changeset 17695 75f25bd4c7d4
parent 17684 e4ed5638bc55
child 17696 b3f0f9a39c4e
largefiles: download missing subrepo revs when archiving This is something plain hgsubrepos already do. Previously, an abort message complained about an unknown revision.
hgext/largefiles/overrides.py
tests/test-largefiles.t
--- a/hgext/largefiles/overrides.py	Fri Sep 28 19:43:40 2012 +0900
+++ b/hgext/largefiles/overrides.py	Sun Sep 23 00:08:13 2012 -0400
@@ -841,6 +841,7 @@
     archiver.done()
 
 def hgsubrepoarchive(orig, repo, ui, archiver, prefix, match=None):
+    repo._get(repo._state + ('hg',))
     rev = repo._state[1]
     ctx = repo._repo[rev]
 
--- a/tests/test-largefiles.t	Fri Sep 28 19:43:40 2012 +0900
+++ b/tests/test-largefiles.t	Sun Sep 23 00:08:13 2012 -0400
@@ -1582,6 +1582,14 @@
   lf_subrepo_archive/subrepo/large.txt
   lf_subrepo_archive/subrepo/normal.txt
 
+Test archiving a revision that references a subrepo that is not yet
+cloned (see test-subrepo-recursion.t):
+
+  $ hg clone -U . ../empty
+  $ cd ../empty
+  $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | "$TESTDIR/filtercr.py"
+  cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo
+  
   $ cd ..
 
 Test that addremove picks up largefiles prior to the initial commit (issue3541)