Patchwork [9,of,9,(38,total)] push: feed pushoperation object to _pushbookmark function

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 2, 2014, 1:33 a.m.
Message ID <1129420c8bef3308c0e4.1391304785@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/3434/
State Superseded
Commit bebf8b8479f30ca24800ed0e6a70d5123ab94d60
Headers show

Comments

Pierre-Yves David - Feb. 2, 2014, 1:33 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1391133101 28800
#      Thu Jan 30 17:51:41 2014 -0800
# Node ID 1129420c8bef3308c0e4a9fa49a2825f0a2abb2a
# Parent  bfddf50093a9713b679db4e45f79469ec8cd9c72
push: feed pushoperation object to _pushbookmark function

This will able the bookmark synchronisation to have full information on the
ongoing push and pass information to other operation.
Matt Mackall - Feb. 3, 2014, 11:23 p.m.
On Sat, 2014-02-01 at 17:33 -0800, pierre-yves.david@ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@logilab.fr>
> # Date 1391133101 28800
> #      Thu Jan 30 17:51:41 2014 -0800
> # Node ID 1129420c8bef3308c0e4a9fa49a2825f0a2abb2a
> # Parent  bfddf50093a9713b679db4e45f79469ec8cd9c72
> push: feed pushoperation object to _pushbookmark function

These are queued for default, thanks.
Matt Mackall - Feb. 4, 2014, 12:06 a.m.
On Mon, 2014-02-03 at 17:23 -0600, Matt Mackall wrote:
> On Sat, 2014-02-01 at 17:33 -0800, pierre-yves.david@ens-lyon.org wrote:
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david@logilab.fr>
> > # Date 1391133101 28800
> > #      Thu Jan 30 17:51:41 2014 -0800
> > # Node ID 1129420c8bef3308c0e4a9fa49a2825f0a2abb2a
> > # Parent  bfddf50093a9713b679db4e45f79469ec8cd9c72
> > push: feed pushoperation object to _pushbookmark function
> 
> These are queued for default, thanks.

Patch 9 breaks test-bookmarks-pushpull.t, dropped.

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -252,17 +252,20 @@  def push(repo, remote, force=False, revs
                 lock.release()
     finally:
         if locallock is not None:
             locallock.release()
 
-    _pushbookmark(pushop.ui, unfi, pushop.remote, pushop.revs)
+    _pushbookmark(pushop)
     return ret
 
-def _pushbookmark(ui, repo, remote, revs):
+def _pushbookmark(pushop):
     """Update bookmark position on remote"""
+    ui = pushop.ui
+    repo = pushop.repo
+    remote = pushop.remote
     ui.debug("checking for updated bookmarks\n")
-    revnums = map(repo.changelog.rev, revs or [])
+    revnums = map(repo.changelog.rev, pushop.revs or [])
     ancestors = [a for a in repo.changelog.ancestors(revnums, inclusive=True)]
     (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
      ) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'),
                            srchex=hex)