mercurial/discovery.py
changeset 26935 c4a7bbc78c74
parent 26862 894f54d84d4a
child 26936 d47ac02fcefa
--- a/mercurial/discovery.py	Thu Nov 12 15:26:30 2015 -0600
+++ b/mercurial/discovery.py	Tue Nov 10 11:13:21 2015 -0800
@@ -255,12 +255,22 @@
 
     return bookmarkedheads
 
-def checkheads(repo, remote, outgoing, remoteheads, newbranch=False, inc=False,
-               newbookmarks=[]):
+def checkheads(pushop):
     """Check that a push won't add any outgoing head
 
     raise Abort error and display ui message as needed.
     """
+
+    repo = pushop.repo.unfiltered()
+    remote = pushop.remote
+    outgoing = pushop.outgoing
+    remoteheads = pushop.remoteheads
+    newbranch = pushop.newbranch
+    inc = bool(pushop.incoming)
+
+    # internal config: bookmarks.pushing
+    newbookmarks = pushop.ui.configlist('bookmarks', 'pushing')
+
     # Check for each named branch if we're creating new remote heads.
     # To be a remote head after push, node must be either:
     # - unknown locally