mercurial/patch.py
changeset 8526 f78eadbb5769
parent 8461 88f317e7d280
child 8527 f9a80054dd3c
equal deleted inserted replaced
8525:b169ba60eebe 8526:f78eadbb5769
   868                 current_hunk.fix_newline()
   868                 current_hunk.fix_newline()
   869             yield 'hunk', current_hunk
   869             yield 'hunk', current_hunk
   870             current_hunk = None
   870             current_hunk = None
   871             gitworkdone = False
   871             gitworkdone = False
   872         if ((sourcefile or state == BFILE) and ((not context and x[0] == '@') or
   872         if ((sourcefile or state == BFILE) and ((not context and x[0] == '@') or
   873             ((context or context == None) and x.startswith('***************')))):
   873             ((context is not False) and x.startswith('***************')))):
   874             try:
   874             try:
   875                 if context == None and x.startswith('***************'):
   875                 if context == None and x.startswith('***************'):
   876                     context = True
   876                     context = True
   877                 gpatch = changed.get(bfile)
   877                 gpatch = changed.get(bfile)
   878                 create = afile == '/dev/null' or gpatch and gpatch.op == 'ADD'
   878                 create = afile == '/dev/null' or gpatch and gpatch.op == 'ADD'