##// END OF EJS Templates
convert: rename sink hascommit to hascommitforsplicemap...
Mads Kiilerich -
r21634:23b24d6a default
parent child Browse files
Show More
@@ -260,8 +260,10 b' class converter_sink(object):'
260 260 """
261 261 pass
262 262
263 def hascommit(self, rev):
264 """Return True if the sink contains rev"""
263 def hascommitforsplicemap(self, rev):
264 """This method is for the special needs for splicemap handling and not
265 for general use. Returns True if the sink contains rev, aborts on some
266 special cases."""
265 267 raise NotImplementedError
266 268
267 269 class commandline(object):
@@ -193,7 +193,7 b' class converter(object):'
193 193 """
194 194 for c in sorted(splicemap):
195 195 if c not in parents:
196 if not self.dest.hascommit(self.map.get(c, c)):
196 if not self.dest.hascommitforsplicemap(self.map.get(c, c)):
197 197 # Could be in source but not converted during this run
198 198 self.ui.warn(_('splice map revision %s is not being '
199 199 'converted, ignoring\n') % c)
@@ -201,7 +201,7 b' class converter(object):'
201 201 pc = []
202 202 for p in splicemap[c]:
203 203 # We do not have to wait for nodes already in dest.
204 if self.dest.hascommit(self.map.get(p, p)):
204 if self.dest.hascommitforsplicemap(self.map.get(p, p)):
205 205 continue
206 206 # Parent is not in dest and not being converted, not good
207 207 if p not in parents:
@@ -253,7 +253,7 b' class mercurial_sink(converter_sink):'
253 253 destmarks[bookmark] = bin(updatedbookmark[bookmark])
254 254 destmarks.write()
255 255
256 def hascommit(self, rev):
256 def hascommitforsplicemap(self, rev):
257 257 if rev not in self.repo and self.clonebranches:
258 258 raise util.Abort(_('revision %s not found in destination '
259 259 'repository (lookups with clonebranches=true '
@@ -1300,7 +1300,7 b' class svn_sink(converter_sink, commandli'
1300 1300 self.ui.warn(_('writing Subversion tags is not yet implemented\n'))
1301 1301 return None, None
1302 1302
1303 def hascommit(self, rev):
1303 def hascommitforsplicemap(self, rev):
1304 1304 # This is not correct as one can convert to an existing subversion
1305 1305 # repository and childmap would not list all revisions. Too bad.
1306 1306 if rev in self.childmap:
General Comments 0
You need to be logged in to leave comments. Login now