[PATCH 2 of 4] bookmarks.updatefromremote: rename local rb to remotemarks

Siddharth Agarwal sid0 at fb.com
Fri Mar 29 21:58:25 CDT 2013


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1364606939 25200
#      Fri Mar 29 18:28:59 2013 -0700
# Node ID 63ce26ea16fcdb94b02b4c4e51edb6d30c4b7dbb
# Parent  7b28513a88c18e92074fb935a433c1305224a599
bookmarks.updatefromremote: rename local rb to remotemarks

This local will become a parameter in an upcoming patch, so give it a more
descriptive name. The name stays similar to the existing localmarks.

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -223,12 +223,12 @@ def pushbookmark(repo, key, old, new):
 
 def updatefromremote(ui, repo, remote, path):
     ui.debug("checking for updated bookmarks\n")
-    rb = remote.listkeys('bookmarks')
+    remotemarks = remote.listkeys('bookmarks')
     changed = False
     localmarks = repo._bookmarks
-    for k in sorted(rb):
+    for k in sorted(remotemarks):
         if k in localmarks:
-            nr, nl = rb[k], localmarks[k]
+            nr, nl = remotemarks[k], localmarks[k]
             if nr in repo:
                 cr = repo[nr]
                 cl = repo[nl]
@@ -257,9 +257,9 @@ def updatefromremote(ui, repo, remote, p
                     localmarks[n] = cr.node()
                     changed = True
                     ui.warn(_("divergent bookmark %s stored as %s\n") % (k, n))
-        elif rb[k] in repo:
+        elif remotemarks[k] in repo:
             # add remote bookmarks for changes we already have
-            localmarks[k] = repo[rb[k]].node()
+            localmarks[k] = repo[remotemarks[k]].node()
             changed = True
             ui.status(_("adding remote bookmark %s\n") % k)
 


More information about the Mercurial-devel mailing list