Show More
@@ -823,9 +823,9 b' def makefilename(repo, pat, node, desc=N' | |||||
823 | total=None, seqno=None, revwidth=None, pathname=None): |
|
823 | total=None, seqno=None, revwidth=None, pathname=None): | |
824 | node_expander = { |
|
824 | node_expander = { | |
825 | 'H': lambda: hex(node), |
|
825 | 'H': lambda: hex(node), | |
826 |
'R': lambda: |
|
826 | 'R': lambda: '%d' % repo.changelog.rev(node), | |
827 | 'h': lambda: short(node), |
|
827 | 'h': lambda: short(node), | |
828 |
'm': lambda: re.sub('[^\w]', '_', |
|
828 | 'm': lambda: re.sub('[^\w]', '_', desc or '') | |
829 | } |
|
829 | } | |
830 | expander = { |
|
830 | expander = { | |
831 | '%': lambda: '%', |
|
831 | '%': lambda: '%', | |
@@ -837,13 +837,13 b' def makefilename(repo, pat, node, desc=N' | |||||
837 | expander.update(node_expander) |
|
837 | expander.update(node_expander) | |
838 | if node: |
|
838 | if node: | |
839 | expander['r'] = (lambda: |
|
839 | expander['r'] = (lambda: | |
840 |
|
|
840 | ('%d' % repo.changelog.rev(node)).zfill(revwidth or 0)) | |
841 | if total is not None: |
|
841 | if total is not None: | |
842 |
expander['N'] = lambda: |
|
842 | expander['N'] = lambda: '%d' % total | |
843 | if seqno is not None: |
|
843 | if seqno is not None: | |
844 |
expander['n'] = lambda: |
|
844 | expander['n'] = lambda: '%d' % seqno | |
845 | if total is not None and seqno is not None: |
|
845 | if total is not None and seqno is not None: | |
846 |
expander['n'] = lambda: |
|
846 | expander['n'] = (lambda: ('%d' % seqno).zfill(len('%d' % total))) | |
847 | if pathname is not None: |
|
847 | if pathname is not None: | |
848 | expander['s'] = lambda: os.path.basename(pathname) |
|
848 | expander['s'] = lambda: os.path.basename(pathname) | |
849 | expander['d'] = lambda: os.path.dirname(pathname) or '.' |
|
849 | expander['d'] = lambda: os.path.dirname(pathname) or '.' |
General Comments 0
You need to be logged in to leave comments.
Login now