Submitter | Pierre-Yves David |
---|---|
Date | March 20, 2015, 3:16 a.m. |
Message ID | <d0ecf62a37d0ab1c2f73.1426821375@marginatus.alto.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/8196/ |
State | Accepted |
Commit | dd01834a696f5e141933f80640ae0eea148ff42c |
Headers | show |
Comments
On Thu, 2015-03-19 at 20:16 -0700, Pierre-Yves David wrote: > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@fb.com> > # Date 1426819943 25200 > # Thu Mar 19 19:52:23 2015 -0700 > # Branch stable > # Node ID d0ecf62a37d0ab1c2f737a164c5d0b50af6fbb31 > # Parent 6136704b975df292819647ba8ac46209487fbc46 > annotate: reuse ancestry context when adjusting linkrev (issue4532) Queued for stable, thanks for looking into this.
Patch
diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -911,10 +911,12 @@ class basefilectx(object): # use linkrev to find the first changeset where self appeared base = self introrev = self.introrev() if self.rev() != introrev: base = self.filectx(self.filenode(), changeid=introrev) + ac = self._repo.changelog.ancestors([introrev], inclusive=True) + base._ancestrycontext = ac # This algorithm would prefer to be recursive, but Python is a # bit recursion-hostile. Instead we do an iterative # depth-first search.