##// END OF EJS Templates
convert: introduce hascommitfrommap sink method...
Mads Kiilerich -
r21635:5f2cc464 default
parent child Browse files
Show More
@@ -260,6 +260,11 b' class converter_sink(object):'
260 """
260 """
261 pass
261 pass
262
262
263 def hascommitfrommap(self, rev):
264 """Return False if a rev mentioned in a filemap is known to not be
265 present."""
266 raise NotImplementedError
267
263 def hascommitforsplicemap(self, rev):
268 def hascommitforsplicemap(self, rev):
264 """This method is for the special needs for splicemap handling and not
269 """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
270 for general use. Returns True if the sink contains rev, aborts on some
@@ -253,6 +253,10 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 hascommitfrommap(self, rev):
257 # the exact semantics of clonebranches is unclear so we can't say no
258 return rev in self.repo or self.clonebranches
259
256 def hascommitforsplicemap(self, rev):
260 def hascommitforsplicemap(self, rev):
257 if rev not in self.repo and self.clonebranches:
261 if rev not in self.repo and self.clonebranches:
258 raise util.Abort(_('revision %s not found in destination '
262 raise util.Abort(_('revision %s not found in destination '
@@ -1300,6 +1300,11 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 hascommitfrommap(self, rev):
1304 # We trust that revisions referenced in a map still is present
1305 # TODO: implement something better if necessary and feasible
1306 return True
1307
1303 def hascommitforsplicemap(self, rev):
1308 def hascommitforsplicemap(self, rev):
1304 # This is not correct as one can convert to an existing subversion
1309 # This is not correct as one can convert to an existing subversion
1305 # repository and childmap would not list all revisions. Too bad.
1310 # repository and childmap would not list all revisions. Too bad.
General Comments 0
You need to be logged in to leave comments. Login now