# HG changeset patch # User FUJIWARA Katsunori # Date 2012-09-22 05:53:50 # Node ID 2b6a795f19f71b1b78b304fe2c97462dc40a490b # Parent 5b6c8f2fbda54348825b48cd748ed121a04d90d8 bookmarks: rename arguments/variables for source code readability Before this patch, the argument bound to the source repository of incoming bookmarks for "bookmarks.diff()" is named as "remote". But in "hg outgoing" case, this argument is bound to local repository object. In addition to it, "local"/"remote" seem to mean not the direction of propagation of bookmarks, but just the location of cooperative repositories. To indicate the direction of propagation of bookmarks clearly on the source code, this patch uses "d(st)" and "s(rc)" combination instead of "l(ocal)" and "r(emote)" one. - "repo" and "remote" arguments are renamed to "dst" and "src" - "lmarks" and "rmarks" variables are renamed to "dmarsk" and "smarks" diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -237,15 +237,15 @@ def updatefromremote(ui, repo, remote, p if changed: write(repo) -def diff(ui, repo, remote): +def diff(ui, dst, src): ui.status(_("searching for changed bookmarks\n")) - lmarks = repo.listkeys('bookmarks') - rmarks = remote.listkeys('bookmarks') + smarks = src.listkeys('bookmarks') + dmarks = dst.listkeys('bookmarks') - diff = sorted(set(rmarks) - set(lmarks)) + diff = sorted(set(smarks) - set(dmarks)) for k in diff: - mark = ui.debugflag and rmarks[k] or rmarks[k][:12] + mark = ui.debugflag and smarks[k] or smarks[k][:12] ui.write(" %-25s %s\n" % (k, mark)) if len(diff) <= 0: