equal
deleted
inserted
replaced
69 |
69 |
70 def binary(self): |
70 def binary(self): |
71 for h in self.header: |
71 for h in self.header: |
72 if h.startswith('index '): |
72 if h.startswith('index '): |
73 return True |
73 return True |
74 |
74 |
75 def pretty(self, fp): |
75 def pretty(self, fp): |
76 for h in self.header: |
76 for h in self.header: |
77 if h.startswith('index '): |
77 if h.startswith('index '): |
78 fp.write(_('this modifies a binary file (all or nothing)\n')) |
78 fp.write(_('this modifies a binary file (all or nothing)\n')) |
79 break |
79 break |
211 'file': newfile, |
211 'file': newfile, |
212 'range': addrange}, |
212 'range': addrange}, |
213 'range': {'context': addcontext, |
213 'range': {'context': addcontext, |
214 'hunk': addhunk}, |
214 'hunk': addhunk}, |
215 } |
215 } |
216 |
216 |
217 p = parser() |
217 p = parser() |
218 |
218 |
219 state = 'context' |
219 state = 'context' |
220 for newstate, data in scanpatch(fp): |
220 for newstate, data in scanpatch(fp): |
221 try: |
221 try: |
309 |
309 |
310 contenders = {} |
310 contenders = {} |
311 for h in chunks: |
311 for h in chunks: |
312 try: contenders.update(dict.fromkeys(h.files())) |
312 try: contenders.update(dict.fromkeys(h.files())) |
313 except AttributeError: pass |
313 except AttributeError: pass |
314 |
314 |
315 newfiles = [f for f in files if f in contenders] |
315 newfiles = [f for f in files if f in contenders] |
316 |
316 |
317 if not newfiles: |
317 if not newfiles: |
318 ui.status(_('no changes to record\n')) |
318 ui.status(_('no changes to record\n')) |
319 return 0 |
319 return 0 |