Commits

Steve Borho committed e57b97c

patchctx: ignore invalid dates in path files (fixes #1361)

Comments (0)

Files changed (1)

tortoisehg/util/patchctx.py

 import binascii
 import cStringIO
 
-from mercurial import patch, util
+from mercurial import patch, util, error
 from mercurial import node
 from mercurial.util import propertycache
 from hgext import mq, record
             if ph.message:
                 ph.diffstartline += 1
         self._user = ph.user or ''
-        self._date = ph.date and util.parsedate(ph.date) or util.makedate()
         self._desc = ph.message and '\n'.join(ph.message).strip() or ''
+        try:
+            self._date = ph.date and util.parsedate(ph.date) or util.makedate()
+        except error.Abort:
+            self._date = util.makedate()
 
     def invalidate(self):
         # ensure the patch contents are re-read