hgext/mq.py
changeset 10731 71cf11f03b3d
parent 10693 2c2b2d384a47
parent 10730 4d6bd7b8b6d8
child 10763 68a7b9ed3c71
equal deleted inserted replaced
10727:62b8f15683f2 10731:71cf11f03b3d
    86         subject = None
    86         subject = None
    87         diffstart = 0
    87         diffstart = 0
    88 
    88 
    89         for line in file(pf):
    89         for line in file(pf):
    90             line = line.rstrip()
    90             line = line.rstrip()
    91             if line.startswith('diff --git'):
    91             if (line.startswith('diff --git')
       
    92                 or (diffstart and line.startswith('+++ '))):
    92                 diffstart = 2
    93                 diffstart = 2
    93                 break
    94                 break
    94             if diffstart:
    95             diffstart = 0 # reset
    95                 if line.startswith('+++ '):
       
    96                     diffstart = 2
       
    97                 break
       
    98             if line.startswith("--- "):
    96             if line.startswith("--- "):
    99                 diffstart = 1
    97                 diffstart = 1
   100                 continue
    98                 continue
   101             elif format == "hgpatch":
    99             elif format == "hgpatch":
   102                 # parse values when importing the result of an hg export
   100                 # parse values when importing the result of an hg export