# HG changeset patch # User timeless <timel...@mozdev.org> # Date 1487089673 0 # Tue Feb 14 16:27:53 2017 +0000 # Node ID 8d10b4c0cd6eb85098ec903c802a9602eda3a2f1 # Parent f2ad0d8047009e6e58ab1fa34ae7107714f5dc30 # Available At https://bitbucket.org/timeless/mercurial-crew # hg pull https://bitbucket.org/timeless/mercurial-crew -r 8d10b4c0cd6e localrepo: change HG_PENDING handling
HG_PENDING is supposed to point to a specific repo when called as part of a hook, without this, any command in a nested repository would read the pending changelog instead of the normal version. diff -r f2ad0d804700 -r 8d10b4c0cd6e mercurial/localrepo.py --- a/mercurial/localrepo.py Tue Feb 14 01:52:16 2017 +0530 +++ b/mercurial/localrepo.py Tue Feb 14 16:27:53 2017 +0000 @@ -509,10 +509,8 @@ @storecache('00changelog.i') def changelog(self): c = changelog.changelog(self.svfs) - if 'HG_PENDING' in encoding.environ: - p = encoding.environ['HG_PENDING'] - if p.startswith(self.root): - c.readpending('00changelog.i.a') + if self.root == encoding.environ.get('HG_PENDING'): + c.readpending('00changelog.i.a') return c def _constructmanifest(self): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel