convert: rename sink hascommit to hascommitforsplicemap
The name 'hascommit' sounds like something generic ... but it might
also throw exceptions in specific cases and it is thus (apparently)
only useful for splicemap.
--- a/hgext/convert/common.py Mon May 19 22:10:50 2014 +0200
+++ b/hgext/convert/common.py Mon May 19 22:11:14 2014 +0200
@@ -260,8 +260,10 @@
"""
pass
- def hascommit(self, rev):
- """Return True if the sink contains rev"""
+ def hascommitforsplicemap(self, rev):
+ """This method is for the special needs for splicemap handling and not
+ for general use. Returns True if the sink contains rev, aborts on some
+ special cases."""
raise NotImplementedError
class commandline(object):
--- a/hgext/convert/convcmd.py Mon May 19 22:10:50 2014 +0200
+++ b/hgext/convert/convcmd.py Mon May 19 22:11:14 2014 +0200
@@ -193,7 +193,7 @@
"""
for c in sorted(splicemap):
if c not in parents:
- if not self.dest.hascommit(self.map.get(c, c)):
+ if not self.dest.hascommitforsplicemap(self.map.get(c, c)):
# Could be in source but not converted during this run
self.ui.warn(_('splice map revision %s is not being '
'converted, ignoring\n') % c)
@@ -201,7 +201,7 @@
pc = []
for p in splicemap[c]:
# We do not have to wait for nodes already in dest.
- if self.dest.hascommit(self.map.get(p, p)):
+ if self.dest.hascommitforsplicemap(self.map.get(p, p)):
continue
# Parent is not in dest and not being converted, not good
if p not in parents:
--- a/hgext/convert/hg.py Mon May 19 22:10:50 2014 +0200
+++ b/hgext/convert/hg.py Mon May 19 22:11:14 2014 +0200
@@ -253,7 +253,7 @@
destmarks[bookmark] = bin(updatedbookmark[bookmark])
destmarks.write()
- def hascommit(self, rev):
+ def hascommitforsplicemap(self, rev):
if rev not in self.repo and self.clonebranches:
raise util.Abort(_('revision %s not found in destination '
'repository (lookups with clonebranches=true '
--- a/hgext/convert/subversion.py Mon May 19 22:10:50 2014 +0200
+++ b/hgext/convert/subversion.py Mon May 19 22:11:14 2014 +0200
@@ -1300,7 +1300,7 @@
self.ui.warn(_('writing Subversion tags is not yet implemented\n'))
return None, None
- def hascommit(self, rev):
+ def hascommitforsplicemap(self, rev):
# This is not correct as one can convert to an existing subversion
# repository and childmap would not list all revisions. Too bad.
if rev in self.childmap: