Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 9467:4c041f1ee1b4
do not attempt to translate ui.debug output
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 19 Sep 2009 01:15:38 +0200 |
parents | 23c4e772c172 |
children | c156bf947e26 |
comparison
equal
deleted
inserted
replaced
9466:1214c64c592b | 9467:4c041f1ee1b4 |
---|---|
91 m = diffre.search(payload) | 91 m = diffre.search(payload) |
92 if m: | 92 if m: |
93 hgpatch = False | 93 hgpatch = False |
94 ignoretext = False | 94 ignoretext = False |
95 | 95 |
96 ui.debug(_('found patch at byte %d\n') % m.start(0)) | 96 ui.debug('found patch at byte %d\n' % m.start(0)) |
97 diffs_seen += 1 | 97 diffs_seen += 1 |
98 cfp = cStringIO.StringIO() | 98 cfp = cStringIO.StringIO() |
99 for line in payload[:m.start(0)].splitlines(): | 99 for line in payload[:m.start(0)].splitlines(): |
100 if line.startswith('# HG changeset patch'): | 100 if line.startswith('# HG changeset patch'): |
101 ui.debug(_('patch generated by hg export\n')) | 101 ui.debug('patch generated by hg export\n') |
102 hgpatch = True | 102 hgpatch = True |
103 # drop earlier commit message content | 103 # drop earlier commit message content |
104 cfp.seek(0) | 104 cfp.seek(0) |
105 cfp.truncate() | 105 cfp.truncate() |
106 subject = None | 106 subject = None |
1153 else: | 1153 else: |
1154 try: | 1154 try: |
1155 return internalpatch(patchname, ui, strip, cwd, files, eolmode) | 1155 return internalpatch(patchname, ui, strip, cwd, files, eolmode) |
1156 except NoHunks: | 1156 except NoHunks: |
1157 patcher = util.find_exe('gpatch') or util.find_exe('patch') or 'patch' | 1157 patcher = util.find_exe('gpatch') or util.find_exe('patch') or 'patch' |
1158 ui.debug(_('no valid hunks found; trying with %r instead\n') % | 1158 ui.debug('no valid hunks found; trying with %r instead\n' % |
1159 patcher) | 1159 patcher) |
1160 if util.needbinarypatch(): | 1160 if util.needbinarypatch(): |
1161 args.append('--binary') | 1161 args.append('--binary') |
1162 return externalpatch(patcher, args, patchname, ui, strip, cwd, | 1162 return externalpatch(patcher, args, patchname, ui, strip, cwd, |
1163 files) | 1163 files) |