equal
deleted
inserted
replaced
636 |
636 |
637 def close(self): |
637 def close(self): |
638 return self.changed | self.removed |
638 return self.changed | self.removed |
639 |
639 |
640 # @@ -start,len +start,len @@ or @@ -start +start @@ if len is 1 |
640 # @@ -start,len +start,len @@ or @@ -start +start @@ if len is 1 |
641 unidesc = re.compile('@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@') |
641 unidesc = re.compile(br'@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@') |
642 contextdesc = re.compile('(?:---|\*\*\*) (\d+)(?:,(\d+))? (?:---|\*\*\*)') |
642 contextdesc = re.compile(br'(?:---|\*\*\*) (\d+)(?:,(\d+))? (?:---|\*\*\*)') |
643 eolmodes = ['strict', 'crlf', 'lf', 'auto'] |
643 eolmodes = ['strict', 'crlf', 'lf', 'auto'] |
644 |
644 |
645 class patchfile(object): |
645 class patchfile(object): |
646 def __init__(self, ui, gp, backend, store, eolmode='strict'): |
646 def __init__(self, ui, gp, backend, store, eolmode='strict'): |
647 self.fname = gp.path |
647 self.fname = gp.path |
2760 binary = binary or b |
2760 binary = binary or b |
2761 |
2761 |
2762 return maxfile, maxtotal, addtotal, removetotal, binary |
2762 return maxfile, maxtotal, addtotal, removetotal, binary |
2763 |
2763 |
2764 def diffstatdata(lines): |
2764 def diffstatdata(lines): |
2765 diffre = re.compile('^diff .*-r [a-z0-9]+\s(.*)$') |
2765 diffre = re.compile(br'^diff .*-r [a-z0-9]+\s(.*)$') |
2766 |
2766 |
2767 results = [] |
2767 results = [] |
2768 filename, adds, removes, isbinary = None, 0, 0, False |
2768 filename, adds, removes, isbinary = None, 0, 0, False |
2769 |
2769 |
2770 def addresult(): |
2770 def addresult(): |