##// 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 pass
261 pass
262
262
263 def hascommit(self, rev):
263 def hascommitforsplicemap(self, rev):
264 """Return True if the sink contains 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 raise NotImplementedError
267 raise NotImplementedError
266
268
267 class commandline(object):
269 class commandline(object):
@@ -193,7 +193,7 b' class converter(object):'
193 """
193 """
194 for c in sorted(splicemap):
194 for c in sorted(splicemap):
195 if c not in parents:
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 # Could be in source but not converted during this run
197 # Could be in source but not converted during this run
198 self.ui.warn(_('splice map revision %s is not being '
198 self.ui.warn(_('splice map revision %s is not being '
199 'converted, ignoring\n') % c)
199 'converted, ignoring\n') % c)
@@ -201,7 +201,7 b' class converter(object):'
201 pc = []
201 pc = []
202 for p in splicemap[c]:
202 for p in splicemap[c]:
203 # We do not have to wait for nodes already in dest.
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 continue
205 continue
206 # Parent is not in dest and not being converted, not good
206 # Parent is not in dest and not being converted, not good
207 if p not in parents:
207 if p not in parents:
@@ -253,7 +253,7 b' class mercurial_sink(converter_sink):'
253 destmarks[bookmark] = bin(updatedbookmark[bookmark])
253 destmarks[bookmark] = bin(updatedbookmark[bookmark])
254 destmarks.write()
254 destmarks.write()
255
255
256 def hascommit(self, rev):
256 def hascommitforsplicemap(self, rev):
257 if rev not in self.repo and self.clonebranches:
257 if rev not in self.repo and self.clonebranches:
258 raise util.Abort(_('revision %s not found in destination '
258 raise util.Abort(_('revision %s not found in destination '
259 'repository (lookups with clonebranches=true '
259 'repository (lookups with clonebranches=true '
@@ -1300,7 +1300,7 b' class svn_sink(converter_sink, commandli'
1300 self.ui.warn(_('writing Subversion tags is not yet implemented\n'))
1300 self.ui.warn(_('writing Subversion tags is not yet implemented\n'))
1301 return None, None
1301 return None, None
1302
1302
1303 def hascommit(self, rev):
1303 def hascommitforsplicemap(self, rev):
1304 # This is not correct as one can convert to an existing subversion
1304 # This is not correct as one can convert to an existing subversion
1305 # repository and childmap would not list all revisions. Too bad.
1305 # repository and childmap would not list all revisions. Too bad.
1306 if rev in self.childmap:
1306 if rev in self.childmap:
General Comments 0
You need to be logged in to leave comments. Login now