[PATCH 2 of 5] largefiles: fix the directory structure when archiving a subrepo in a subrepo
Na'Tosha Bard
natosha at unity3d.com
Thu Jun 21 12:29:41 UTC 2012
2012/6/20 Matt Harbison <matt_harbison at yahoo.com>
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1340074971 14400
> # Node ID 0588cf50d6e8b4c06d4263418ef3b1dcc87a2bf8
> # Parent 6f8473232a828efca13bac418e407e505801f55b
> 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.
>
> 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(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
> 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
> @@ -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 ..
>
Seems OK -- ideally we wouldn't just be calling ._path right off of repo
like that, but seems like it would require a bit of a refactor to make it
more pretty.
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://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20120621/6d8823a6/attachment-0002.html>
More information about the Mercurial-devel
mailing list