##// END OF EJS Templates
obsstore: add an explicit `date` argument to obsstore.create...
Pierre-Yves David -
r22217:570f8742 default
parent child Browse files
Show More
@@ -259,7 +259,8 b' class obsstore(object):'
259 def __nonzero__(self):
259 def __nonzero__(self):
260 return bool(self._all)
260 return bool(self._all)
261
261
262 def create(self, transaction, prec, succs=(), flag=0, metadata=None):
262 def create(self, transaction, prec, succs=(), flag=0, date=None,
263 metadata=None):
263 """obsolete: add a new obsolete marker
264 """obsolete: add a new obsolete marker
264
265
265 * ensuring it is hashable
266 * ensuring it is hashable
@@ -275,7 +276,9 b' class obsstore(object):'
275 if metadata is None:
276 if metadata is None:
276 metadata = {}
277 metadata = {}
277 if 'date' not in metadata:
278 if 'date' not in metadata:
278 metadata['date'] = "%d %d" % util.makedate()
279 if date is None:
280 date = util.makedate()
281 metadata['date'] = "%d %d" % date
279 if len(prec) != 20:
282 if len(prec) != 20:
280 raise ValueError(prec)
283 raise ValueError(prec)
281 for succ in succs:
284 for succ in succs:
General Comments 0
You need to be logged in to leave comments. Login now