hgext/convert/common.py
changeset 20373 e8203629371b
parent 19122 83973dc1bfe9
child 20378 9616b03113ce
--- a/hgext/convert/common.py	Thu Apr 18 10:05:50 2013 -0500
+++ b/hgext/convert/common.py	Tue Jan 21 11:34:55 2014 -0600
@@ -63,13 +63,13 @@
 
         self.encoding = 'utf-8'
 
-    def checkhexformat(self, revstr):
+    def checkhexformat(self, revstr, mapname='splicemap'):
         """ fails if revstr is not a 40 byte hex. mercurial and git both uses
             such format for their revision numbering
         """
         if not re.match(r'[0-9a-fA-F]{40,40}$', revstr):
-            raise util.Abort(_('splicemap entry %s is not a valid revision'
-                               ' identifier') % revstr)
+            raise util.Abort(_('%s entry %s is not a valid revision'
+                               ' identifier') % (mapname, revstr))
 
     def before(self):
         pass
@@ -172,7 +172,7 @@
         """
         return {}
 
-    def checkrevformat(self, revstr):
+    def checkrevformat(self, revstr, mapname='splicemap'):
         """revstr is a string that describes a revision in the given
            source control system.  Return true if revstr has correct
            format.