# HG changeset patch # User Matt Harbison # Date 1339984668 14400 # Node ID 7d45730ea1b877d8af64a04f7354ee0c3219dbd9 # Parent 5a9acb0b208620f30ca99d478df45317c361c063 largefiles: fix a traceback when archiving a subrepo in a subrepo This regression was introduced in 43fb170a23bd. diff -r 5a9acb0b2086 -r 7d45730ea1b8 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Thu Jun 21 12:50:15 2012 +0200 +++ b/hgext/largefiles/overrides.py Sun Jun 17 21:57:48 2012 -0400 @@ -850,7 +850,7 @@ for subpath in ctx.substate: sub = ctx.sub(subpath) - sub.archive(repo.ui, archiver, prefix) + sub.archive(ui, archiver, prefix) # If a largefile is modified, the change is not reflected in its # standin until a commit. cmdutil.bailifchanged() raises an exception diff -r 5a9acb0b2086 -r 7d45730ea1b8 tests/test-subrepo-deep-nested-change.t --- a/tests/test-subrepo-deep-nested-change.t Thu Jun 21 12:50:15 2012 +0200 +++ b/tests/test-subrepo-deep-nested-change.t Sun Jun 17 21:57:48 2012 -0400 @@ -98,3 +98,35 @@ path sub2 source ../sub2 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487 + +Check that deep archive works with largefiles (which overrides hgsubrepo impl) +This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo +subrepos are archived properly. +Note that add --large through a subrepo currently adds the file as a normal file + + $ cd cloned + $ echo "large" > sub1/sub2/large.bin + $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin + $ echo "large" > large.bin + $ hg --config extensions.largefiles= add --large large.bin + $ hg --config extensions.largefiles= ci -S -m "add large files" + committing subrepository sub1 + committing subrepository sub1/sub2 + + $ hg --config extensions.largefiles= archive -S ../archive_lf + $ find ../archive_lf | sort + ../archive_lf + ../archive_lf/.hg_archival.txt + ../archive_lf/.hgsub + ../archive_lf/.hgsubstate + ../archive_lf/large.bin + ../archive_lf/main + ../archive_lf/sub1 + ../archive_lf/sub1/.hgsub + ../archive_lf/sub1/.hgsubstate + ../archive_lf/sub1/sub1 + ../archive_lf/sub2 + ../archive_lf/sub2/large.bin + ../archive_lf/sub2/sub2 + + $ cd ..