##// END OF EJS Templates
obsstore: `create` method return True if a marker is actually added...
Pierre-Yves David -
r20584:224a058f default
parent child Browse files
Show More
@@ -259,6 +259,9 b' class obsstore(object):'
259
259
260 If you are a human writing code creating marker you want to use the
260 If you are a human writing code creating marker you want to use the
261 `createmarkers` function in this module instead.
261 `createmarkers` function in this module instead.
262
263 return True if a new marker have been added, False if the markers
264 already existed (no op).
262 """
265 """
263 if metadata is None:
266 if metadata is None:
264 metadata = {}
267 metadata = {}
@@ -270,7 +273,7 b' class obsstore(object):'
270 if len(succ) != 20:
273 if len(succ) != 20:
271 raise ValueError(succ)
274 raise ValueError(succ)
272 marker = (str(prec), tuple(succs), int(flag), encodemeta(metadata))
275 marker = (str(prec), tuple(succs), int(flag), encodemeta(metadata))
273 self.add(transaction, [marker])
276 return bool(self.add(transaction, [marker]))
274
277
275 def add(self, transaction, markers):
278 def add(self, transaction, markers):
276 """Add new markers to the store
279 """Add new markers to the store
General Comments 0
You need to be logged in to leave comments. Login now