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

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 22, 2013, 1:13 a.m.
Message ID <e28af512bf8ce83adf1b.1385082793@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/3091/
State Superseded
Commit a602d2aca8bf16243a5b2d6b5b113e6977771a30
Headers show

Comments

Siddharth Agarwal - Nov. 22, 2013, 1:13 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.
Siddharth Agarwal - Nov. 22, 2013, 1:15 a.m.
On 11/21/2013 05:13 PM, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@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 series is V2, except I forgot to flag it as such. Sigh.
David Soria Parra - Nov. 22, 2013, 1:39 a.m.
Series looks good to me.

On 11/21/13, 5:13 PM, "Siddharth Agarwal" <sid0@fb.com> wrote:

># HG changeset patch
># User Siddharth Agarwal <sid0@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"))
>_______________________________________________
>Mercurial-devel mailing list
>Mercurial-devel@selenic.com
>http://selenic.com/mailman/listinfo/mercurial-devel

Patch

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"))