Show More
@@ -893,23 +893,17 b' def getcommiteditor(edit=False, finishde' | |||
|
893 | 893 | |
|
894 | 894 | def makefilename(repo, pat, node, desc=None, |
|
895 | 895 | total=None, seqno=None, revwidth=None, pathname=None): |
|
896 |
|
|
|
896 | expander = { | |
|
897 | 897 | 'H': lambda: hex(node), |
|
898 | 898 | 'R': lambda: '%d' % repo.changelog.rev(node), |
|
899 | 899 | 'h': lambda: short(node), |
|
900 | 'm': lambda: re.sub('[^\w]', '_', desc or '') | |
|
901 | } | |
|
902 | expander = { | |
|
900 | 'm': lambda: re.sub('[^\w]', '_', desc or ''), | |
|
901 | 'r': lambda: ('%d' % repo.changelog.rev(node)).zfill(revwidth or 0), | |
|
903 | 902 | '%': lambda: '%', |
|
904 | 903 | 'b': lambda: os.path.basename(repo.root), |
|
905 | 904 | } |
|
906 | 905 | |
|
907 | 906 | try: |
|
908 | if node: | |
|
909 | expander.update(node_expander) | |
|
910 | if node: | |
|
911 | expander['r'] = (lambda: | |
|
912 | ('%d' % repo.changelog.rev(node)).zfill(revwidth or 0)) | |
|
913 | 907 | if total is not None: |
|
914 | 908 | expander['N'] = lambda: '%d' % total |
|
915 | 909 | if seqno is not None: |
@@ -960,7 +954,7 b' class _unclosablefile(object):' | |||
|
960 | 954 | def __exit__(self, exc_type, exc_value, exc_tb): |
|
961 | 955 | pass |
|
962 | 956 | |
|
963 |
def makefileobj(repo, pat, node |
|
|
957 | def makefileobj(repo, pat, node, desc=None, total=None, | |
|
964 | 958 | seqno=None, revwidth=None, mode='wb', modemap=None, |
|
965 | 959 | pathname=None): |
|
966 | 960 |
@@ -486,7 +486,7 b' def archive(ui, repo, dest, **opts):' | |||
|
486 | 486 | if dest == '-': |
|
487 | 487 | if kind == 'files': |
|
488 | 488 | raise error.Abort(_('cannot archive plain files to stdout')) |
|
489 | dest = cmdutil.makefileobj(repo, dest) | |
|
489 | dest = cmdutil.makefileobj(repo, dest, node) | |
|
490 | 490 | if not prefix: |
|
491 | 491 | prefix = os.path.basename(repo.root) + '-%h' |
|
492 | 492 |
General Comments 0
You need to be logged in to leave comments.
Login now