mercurial/obsolete.py
branchstable
changeset 22177 a56038e6a3c9
parent 21166 bf2891877378
child 22207 8dda6f6ff564
equal deleted inserted replaced
22176:328efb5ca0b4 22177:a56038e6a3c9
   275         if len(prec) != 20:
   275         if len(prec) != 20:
   276             raise ValueError(prec)
   276             raise ValueError(prec)
   277         for succ in succs:
   277         for succ in succs:
   278             if len(succ) != 20:
   278             if len(succ) != 20:
   279                 raise ValueError(succ)
   279                 raise ValueError(succ)
       
   280         if prec in succs:
       
   281             raise ValueError(_('in-marker cycle with %s') % node.hex(prec))
   280         marker = (str(prec), tuple(succs), int(flag), encodemeta(metadata))
   282         marker = (str(prec), tuple(succs), int(flag), encodemeta(metadata))
   281         return bool(self.add(transaction, [marker]))
   283         return bool(self.add(transaction, [marker]))
   282 
   284 
   283     def add(self, transaction, markers):
   285     def add(self, transaction, markers):
   284         """Add new markers to the store
   286         """Add new markers to the store