equal
deleted
inserted
replaced
49 stringio = util.stringio |
49 stringio = util.stringio |
50 |
50 |
51 gitre = re.compile(br'diff --git a/(.*) b/(.*)') |
51 gitre = re.compile(br'diff --git a/(.*) b/(.*)') |
52 tabsplitter = re.compile(br'(\t+|[^\t]+)') |
52 tabsplitter = re.compile(br'(\t+|[^\t]+)') |
53 wordsplitter = re.compile( |
53 wordsplitter = re.compile( |
54 br'(\t+| +|[a-zA-Z0-9_\x80-\xff]+|' b'[^ \ta-zA-Z0-9_\x80-\xff])' |
54 br'(\t+| +|[a-zA-Z0-9_\x80-\xff]+|[^ \ta-zA-Z0-9_\x80-\xff])' |
55 ) |
55 ) |
56 |
56 |
57 PatchError = error.PatchError |
57 PatchError = error.PatchError |
58 |
58 |
59 # public functions |
59 # public functions |
803 return -1 |
803 return -1 |
804 |
804 |
805 if self.exists and self.create: |
805 if self.exists and self.create: |
806 if self.copysource: |
806 if self.copysource: |
807 self.ui.warn( |
807 self.ui.warn( |
808 _(b"cannot create %s: destination already " b"exists\n") |
808 _(b"cannot create %s: destination already exists\n") |
809 % self.fname |
809 % self.fname |
810 ) |
810 ) |
811 else: |
811 else: |
812 self.ui.warn(_(b"file %s already exists\n") % self.fname) |
812 self.ui.warn(_(b"file %s already exists\n") % self.fname) |
813 self.rej.append(h) |
813 self.rej.append(h) |
3189 ) |
3189 ) |
3190 ) |
3190 ) |
3191 |
3191 |
3192 if stats: |
3192 if stats: |
3193 output.append( |
3193 output.append( |
3194 _(b' %d files changed, %d insertions(+), ' b'%d deletions(-)\n') |
3194 _(b' %d files changed, %d insertions(+), %d deletions(-)\n') |
3195 % (len(stats), totaladds, totalremoves) |
3195 % (len(stats), totaladds, totalremoves) |
3196 ) |
3196 ) |
3197 |
3197 |
3198 return b''.join(output) |
3198 return b''.join(output) |
3199 |
3199 |