[PATCH] bundlerepo: properly hidden revision in bundle (issue4945)

Sean Farley sean at farley.io
Mon Feb 22 16:52:45 EST 2016


Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1456162540 -3600
> #      Mon Feb 22 18:35:40 2016 +0100
> # Node ID c3f0732d8bfcda5c430b5bf0fc21e22580fa8bbc
> # Parent  28e1694ca60056d609ae2c8e0ad5cb2891416ea3
> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r c3f0732d8bfc
> bundlerepo: properly hidden revision in bundle (issue4945)
>
> The bundlerepository have to do some special magic to handle linkrev of the
> bundled filerev. That logic was done from a repoview and obsolescence marker
> affecting bundled changeset could lead to a crash. We now ensure we operate on
> unfiltered repository.
>
> diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
> --- a/mercurial/bundlerepo.py
> +++ b/mercurial/bundlerepo.py
> @@ -360,11 +360,12 @@ class bundlerepository(localrepo.localre
>                      if not c:
>                          break
>  
>          if f in self.bundlefilespos:
>              self.bundle.seek(self.bundlefilespos[f])
> -            return bundlefilelog(self.svfs, f, self.bundle, self.changelog.rev)
> +            linkmapper = self.unfiltered().changelog.rev
> +            return bundlefilelog(self.svfs, f, self.bundle, linkmapper)

Would this logic also be the same to fix issue5070?
http://bz.mercurial-scm.org/show_bug.cgi?id=5070


More information about the Mercurial-devel mailing list