[PATCH 5 of 5] commands.bookmarks: move hexfn to inside list block

Siddharth Agarwal sid0 at fb.com
Thu Nov 21 19:13:13 CST 2013


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1384893809 28800
#      Tue Nov 19 12:43:29 2013 -0800
# Node ID e28af512bf8ce83adf1b62242f15886de0402180
# Parent  a96328b05252b5fa8a15234060dc363dc96aa5ef
commands.bookmarks: move hexfn to inside list block

This isn't used outside this block, nor is it expected to be.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -807,8 +807,6 @@
     rename = opts.get('rename')
     inactive = opts.get('inactive')
 
-    hexfn = ui.debugflag and hex or short
-
     def checkformat(mark):
         mark = mark.strip()
         if not mark:
@@ -918,6 +916,7 @@
         finally:
             wlock.release()
     else: # show bookmarks
+        hexfn = ui.debugflag and hex or short
         marks = repo._bookmarks
         if len(marks) == 0:
             ui.status(_("no bookmarks set\n"))


More information about the Mercurial-devel mailing list