changeset 22652:15bc5ea297f5

bookmark: remove now unused `pushtoremote` function Everything is unified in the push discovery now.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 26 Sep 2014 23:04:35 -0700
parents b901645a8784
children d94f5bec9c8e
files mercurial/bookmarks.py
diffstat 1 files changed, 0 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Sat Sep 27 20:51:53 2014 -0700
+++ b/mercurial/bookmarks.py	Fri Sep 26 23:04:35 2014 -0700
@@ -376,36 +376,6 @@
             writer(msg)
         localmarks.write()
 
-def pushtoremote(ui, repo, remote, targets):
-    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
-     ) = compare(repo, repo._bookmarks, remote.listkeys('bookmarks'),
-                 srchex=hex, targets=targets)
-    if invalid:
-        b, scid, dcid = invalid[0]
-        ui.warn(_('bookmark %s does not exist on the local '
-                  'or remote repository!\n') % b)
-        return 2
-
-    def push(b, old, new):
-        r = remote.pushkey('bookmarks', b, old, new)
-        if not r:
-            ui.warn(_('updating bookmark %s failed!\n') % b)
-            return 1
-        return 0
-    failed = 0
-    for b, scid, dcid in sorted(addsrc + advsrc + advdst + diverge + differ):
-        ui.status(_("exporting bookmark %s\n") % b)
-        if dcid is None:
-            dcid = ''
-        failed += push(b, dcid, scid)
-    for b, scid, dcid in adddst:
-        # treat as "deleted locally"
-        ui.status(_("deleting remote bookmark %s\n") % b)
-        failed += push(b, dcid, '')
-
-    if failed:
-        return 1
-
 def diff(ui, dst, src):
     ui.status(_("searching for changed bookmarks\n"))