Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 37087:f0b6fbea00cf
stringutil: bulk-replace call sites to point to new module
This might conflict with other patches floating around, sorry.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Mar 2018 21:56:20 +0900 |
parents | 317382151ac3 |
children | 08890706366e |
comparison
equal
deleted
inserted
replaced
37086:f99d64e8a4e4 | 37087:f0b6fbea00cf |
---|---|
46 templatekw, | 46 templatekw, |
47 templater, | 47 templater, |
48 util, | 48 util, |
49 vfs as vfsmod, | 49 vfs as vfsmod, |
50 ) | 50 ) |
51 from .utils import dateutil | 51 |
52 from .utils import ( | |
53 dateutil, | |
54 stringutil, | |
55 ) | |
56 | |
52 stringio = util.stringio | 57 stringio = util.stringio |
53 | 58 |
54 # templates of common command options | 59 # templates of common command options |
55 | 60 |
56 dryrunopts = [ | 61 dryrunopts = [ |
960 continue | 965 continue |
961 i = start | 966 i = start |
962 while i < end: | 967 while i < end: |
963 n = pat.find(b'%', i, end) | 968 n = pat.find(b'%', i, end) |
964 if n < 0: | 969 if n < 0: |
965 newname.append(util.escapestr(pat[i:end])) | 970 newname.append(stringutil.escapestr(pat[i:end])) |
966 break | 971 break |
967 newname.append(util.escapestr(pat[i:n])) | 972 newname.append(stringutil.escapestr(pat[i:n])) |
968 if n + 2 > end: | 973 if n + 2 > end: |
969 raise error.Abort(_("incomplete format spec in output " | 974 raise error.Abort(_("incomplete format spec in output " |
970 "filename")) | 975 "filename")) |
971 c = pat[n + 1:n + 2] | 976 c = pat[n + 1:n + 2] |
972 i = n + 2 | 977 i = n + 2 |
1477 files = set() | 1482 files = set() |
1478 try: | 1483 try: |
1479 patch.patchrepo(ui, repo, p1, store, tmpname, strip, prefix, | 1484 patch.patchrepo(ui, repo, p1, store, tmpname, strip, prefix, |
1480 files, eolmode=None) | 1485 files, eolmode=None) |
1481 except error.PatchError as e: | 1486 except error.PatchError as e: |
1482 raise error.Abort(util.forcebytestr(e)) | 1487 raise error.Abort(stringutil.forcebytestr(e)) |
1483 if opts.get('exact'): | 1488 if opts.get('exact'): |
1484 editor = None | 1489 editor = None |
1485 else: | 1490 else: |
1486 editor = getcommiteditor(editform='import.bypass') | 1491 editor = getcommiteditor(editform='import.bypass') |
1487 memctx = context.memctx(repo, (p1.node(), p2.node()), | 1492 memctx = context.memctx(repo, (p1.node(), p2.node()), |