# HG changeset patch # User Mads Kiilerich # Date 1400530274 -7200 # Node ID 23b24d6a70c80424910e65edc9f6f3aec15f898f # Parent 0ae44984b8d99b508efd99a053aeab62446faa95 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. diff -r 0ae44984b8d9 -r 23b24d6a70c8 hgext/convert/common.py --- 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): diff -r 0ae44984b8d9 -r 23b24d6a70c8 hgext/convert/convcmd.py --- 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: diff -r 0ae44984b8d9 -r 23b24d6a70c8 hgext/convert/hg.py --- 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 ' diff -r 0ae44984b8d9 -r 23b24d6a70c8 hgext/convert/subversion.py --- 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: