mercurial/exchange.py
changeset 22623 cd7e17aa6040
parent 22622 ce6b9edee725
child 22624 eef31f9a4c0f
--- a/mercurial/exchange.py	Thu Sep 25 15:26:09 2014 -0700
+++ b/mercurial/exchange.py	Thu Sep 25 01:49:20 2014 -0700
@@ -61,7 +61,8 @@
     afterward.
     """
 
-    def __init__(self, repo, remote, force=False, revs=None, newbranch=False):
+    def __init__(self, repo, remote, force=False, revs=None, newbranch=False,
+                 bookmarks=()):
         # repo we push from
         self.repo = repo
         self.ui = repo.ui
@@ -71,6 +72,8 @@
         self.force = force
         # revs to be pushed (None is "all")
         self.revs = revs
+        # bookmark explicitly pushed
+        self.bookmarks = bookmarks
         # allow push of new branch
         self.newbranch = newbranch
         # did a local lock get acquired?
@@ -145,7 +148,7 @@
         else:
             return self.fallbackheads
 
-def push(repo, remote, force=False, revs=None, newbranch=False):
+def push(repo, remote, force=False, revs=None, newbranch=False, bookmarks=()):
     '''Push outgoing changesets (limited by revs) from a local
     repository to remote. Return an integer:
       - None means nothing to push
@@ -154,7 +157,7 @@
         we have outgoing changesets but refused to push
       - other values as described by addchangegroup()
     '''
-    pushop = pushoperation(repo, remote, force, revs, newbranch)
+    pushop = pushoperation(repo, remote, force, revs, newbranch, bookmarks)
     if pushop.remote.local():
         missing = (set(pushop.repo.requirements)
                    - pushop.remote.local().supported)