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