mercurial/patch.py
changeset 34964 7ebf850d3166
parent 34908 907ff34e1460
child 34968 3649c3f2cd90
equal deleted inserted replaced
34963:ddf37b6b8c3d 34964:7ebf850d3166
   201     Any item can be missing from the dictionary. If filename is missing,
   201     Any item can be missing from the dictionary. If filename is missing,
   202     fileobj did not contain a patch. Caller must unlink filename when done.'''
   202     fileobj did not contain a patch. Caller must unlink filename when done.'''
   203 
   203 
   204     # attempt to detect the start of a patch
   204     # attempt to detect the start of a patch
   205     # (this heuristic is borrowed from quilt)
   205     # (this heuristic is borrowed from quilt)
   206     diffre = re.compile(br'^(?:Index:[ \t]|diff[ \t]|RCS file: |'
   206     diffre = re.compile(br'^(?:Index:[ \t]|diff[ \t]-|RCS file: |'
   207                         br'retrieving revision [0-9]+(\.[0-9]+)*$|'
   207                         br'retrieving revision [0-9]+(\.[0-9]+)*$|'
   208                         br'---[ \t].*?^\+\+\+[ \t]|'
   208                         br'---[ \t].*?^\+\+\+[ \t]|'
   209                         br'\*\*\*[ \t].*?^---[ \t])',
   209                         br'\*\*\*[ \t].*?^---[ \t])',
   210                         re.MULTILINE | re.DOTALL)
   210                         re.MULTILINE | re.DOTALL)
   211 
   211