[PATCH] bookmarks: fix HG_PENDING handling

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sun Feb 19 13:57:54 EST 2017


At Wed, 15 Feb 2017 21:33:20 -0500,
Augie Fackler wrote:
> 
> foozy, how does this (and timeless' other patch in the same basic
> area) relate to the patches you said you've got coming?

(sorry for late response)

This series (for bookmarks.py and localrepo.py) LGTM as the first step
of fixing HG_PENDING issues.

I can revise my pending patches for them easily.

> Thanks!
> Augie
> 
> On Tue, Feb 14, 2017 at 04:19:45PM +0000, timeless wrote:
> > # HG changeset patch
> > # User timeless <timeless at mozdev.org>
> > # Date 1487089111 0
> > #      Tue Feb 14 16:18:31 2017 +0000
> > # Node ID 54804162d8b35ceff3bd22f05b515fc716705ce2
> > # Parent  f2ad0d8047009e6e58ab1fa34ae7107714f5dc30
> > # Available At https://bitbucket.org/timeless/mercurial-crew
> > #              hg pull https://bitbucket.org/timeless/mercurial-crew -r 54804162d8b3
> > bookmarks: fix 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 an
> > unrelated repository would read the pending version of
> > bookmark state instead of the version that is appropriate.
> >
> > diff -r f2ad0d804700 -r 54804162d8b3 mercurial/bookmarks.py
> > --- a/mercurial/bookmarks.py	Tue Feb 14 01:52:16 2017 +0530
> > +++ b/mercurial/bookmarks.py	Tue Feb 14 16:18:31 2017 +0000
> > @@ -30,7 +30,7 @@
> >      may need to tweak this behavior further.
> >      """
> >      bkfile = None
> > -    if 'HG_PENDING' in encoding.environ:
> > +    if encoding.environ.get('HG_PENDING') == repo.root:
> >          try:
> >              bkfile = repo.vfs('bookmarks.pending')
> >          except IOError as inst:
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 

-- 
----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list