[PATCH STABLE] largefiles: download missing subrepo revs when archiving

Matt Harbison matt_harbison at yahoo.com
Mon Sep 24 20:38:30 CDT 2012


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1348373293 14400
# Branch stable
# Node ID a78509dc7787c6253a68cae45ae61ef6bab10390
# Parent  133d13e445446e07ad2d62de6ebfda7a4df8348b
largefiles: download missing subrepo revs when archiving

This is something plain hgsubrepos already do.  Previously, an abort message
complained about an unknown revision.

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -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]
 
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1544,4 +1544,12 @@
   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 ..


More information about the Mercurial-devel mailing list