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

login
register
mail settings
Submitter Siddharth Agarwal
Date March 30, 2013, 2:58 a.m.
Message ID <63ce26ea16fcdb94b02b.1364612305@sid0x220>
Download mbox | patch
Permalink /patch/1227/
State Accepted
Commit b4ddc43ddf9da01ebaf2e599f103bd819deba02e
Headers show

Comments

Siddharth Agarwal - March 30, 2013, 2:58 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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)