[PATCH 1 of 6] push: update bookmark within the remote lock

Gregory Szorc gregory.szorc at gmail.com
Mon Aug 18 18:54:04 CDT 2014


On 8/18/2014 2:49 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1408141512 25200
> #      Fri Aug 15 15:25:12 2014 -0700
> # Node ID cef89d04868a41c6e1a7951e9f2add046fcc681c
> # Parent  8dda6f6ff564d8fe6ac7b8ce4c74eb9bfb5de14a
> push: update bookmark within the remote lock
> 
> Update the bookmark is part of the push. It should be done within the same lock
> than the other steps of the push.
> 
> diff --git a/mercurial/exchange.py b/mercurial/exchange.py
> --- a/mercurial/exchange.py
> +++ b/mercurial/exchange.py
> @@ -185,18 +185,18 @@ def push(repo, remote, force=False, revs
>                  and pushop.remote.capable('bundle2-exp')):
>                  _pushbundle2(pushop)
>              _pushchangeset(pushop)
>              _pushsyncphase(pushop)
>              _pushobsolete(pushop)
> +            _pushbookmark(pushop)
>          finally:
>              if lock is not None:
>                  lock.release()
>      finally:
>          if locallock is not None:
>              locallock.release()
>  
> -    _pushbookmark(pushop)
>      return pushop.ret
>  
>  # list of steps to perform discovery before push
>  pushdiscoveryorder = []

Bah, you just changed the behavior of some of my extensions.

Because there's no "do post push things with the pushop instance" hook
point, I was overloading _pushbookmark() to do all the "post push
things" in a few of my extensions. I may have to revive some of my "add
instance hooks/events to repo instances" patches and get them into 3.2...


More information about the Mercurial-devel mailing list