Mercurial > hg-stable
changeset 21634:23b24d6a70c8
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.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 19 May 2014 22:11:14 +0200 |
parents | 0ae44984b8d9 |
children | 5f2cc464e502 |
files | hgext/convert/common.py hgext/convert/convcmd.py hgext/convert/hg.py hgext/convert/subversion.py |
diffstat | 4 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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: