[PATCH 1 of 5] largefiles: fix a traceback when archiving a subrepo in a subrepo

Na'Tosha Bard natosha at unity3d.com
Thu Jun 21 07:26:06 CDT 2012


2012/6/20 Matt Harbison <matt_harbison at yahoo.com>

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1339984668 14400
> # Node ID 6f8473232a828efca13bac418e407e505801f55b
> # Parent  132ea1736751cb02b16992cf421e7de8bad888a1
> largefiles: fix a traceback when archiving a subrepo in a subrepo
>
> This regression was introduced in 43fb170a23bd.
>
> diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
> --- a/hgext/largefiles/overrides.py
> +++ b/hgext/largefiles/overrides.py
> @@ -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 --git a/tests/test-subrepo-deep-nested-change.t
> b/tests/test-subrepo-deep-nested-change.t
> --- a/tests/test-subrepo-deep-nested-change.t
> +++ b/tests/test-subrepo-deep-nested-change.t
> @@ -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 ..
>

This looks good to me.

Cheers,
Na'Tosha

-- 
*Na'Tosha Bard*
Software Developer | Unity Technologies - Copenhagen

*E-Mail:* natosha at unity3d.com
*Skype:* natosha.bard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120621/dcbd07a5/attachment.html>


More information about the Mercurial-devel mailing list