Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 20235:a602d2aca8bf
commands.bookmarks: move hexfn to inside list block
This isn't used outside this block, nor is it expected to be.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 19 Nov 2013 12:43:29 -0800 |
parents | 8a133190da89 |
children | 0d32dd60016c |
comparison
equal
deleted
inserted
replaced
20234:8a133190da89 | 20235:a602d2aca8bf |
---|---|
805 rev = opts.get('rev') | 805 rev = opts.get('rev') |
806 delete = opts.get('delete') | 806 delete = opts.get('delete') |
807 rename = opts.get('rename') | 807 rename = opts.get('rename') |
808 inactive = opts.get('inactive') | 808 inactive = opts.get('inactive') |
809 | 809 |
810 hexfn = ui.debugflag and hex or short | |
811 | |
812 def checkformat(mark): | 810 def checkformat(mark): |
813 mark = mark.strip() | 811 mark = mark.strip() |
814 if not mark: | 812 if not mark: |
815 raise util.Abort(_("bookmark names cannot consist entirely of " | 813 raise util.Abort(_("bookmark names cannot consist entirely of " |
816 "whitespace")) | 814 "whitespace")) |
918 else: | 916 else: |
919 bookmarks.unsetcurrent(repo) | 917 bookmarks.unsetcurrent(repo) |
920 finally: | 918 finally: |
921 wlock.release() | 919 wlock.release() |
922 else: # show bookmarks | 920 else: # show bookmarks |
921 hexfn = ui.debugflag and hex or short | |
923 marks = repo._bookmarks | 922 marks = repo._bookmarks |
924 if len(marks) == 0: | 923 if len(marks) == 0: |
925 ui.status(_("no bookmarks set\n")) | 924 ui.status(_("no bookmarks set\n")) |
926 else: | 925 else: |
927 for bmark, n in sorted(marks.iteritems()): | 926 for bmark, n in sorted(marks.iteritems()): |