--- a/hgext/record.py Thu Apr 11 19:03:33 2013 +0200
+++ b/hgext/record.py Wed Jun 13 23:06:34 2012 +0200
@@ -76,7 +76,7 @@
if m:
yield 'range', m.groups()
else:
- raise patch.PatchError('unknown patch content: %r' % line)
+ yield 'other', line
class header(object):
"""patch header
@@ -228,6 +228,9 @@
self.headers.append(h)
self.header = h
+ def addother(self, line):
+ pass # 'other' lines are ignored
+
def finished(self):
self.addcontext([])
return self.headers
@@ -239,12 +242,14 @@
'range': addrange},
'context': {'file': newfile,
'hunk': addhunk,
- 'range': addrange},
+ 'range': addrange,
+ 'other': addother},
'hunk': {'context': addcontext,
'file': newfile,
'range': addrange},
'range': {'context': addcontext,
'hunk': addhunk},
+ 'other': {'other': addother},
}
p = parser()