From patchwork Tue Aug 19 00:49:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,7] obsstore: add a `parents` argument to obsstore.create From: Pierre-Yves David X-Patchwork-Id: 5498 Message-Id: To: mercurial-devel@selenic.com Cc: Pierre-Yves David Date: Mon, 18 Aug 2014 17:49:32 -0700 # HG changeset patch # User Pierre-Yves David # Date 1408403549 25200 # Mon Aug 18 16:12:29 2014 -0700 # Node ID e76cbc618247482edd7cf4f3ea986256b7e5a31b # Parent d5fefc953f30affb41ce59289d6791b116169708 obsstore: add a `parents` argument to obsstore.create We needs a way to pass the information to the function. Some guru told me that what's arguments are made for. diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -260,12 +260,12 @@ class obsstore(object): return len(self._all) def __nonzero__(self): return bool(self._all) - def create(self, transaction, prec, succs=(), flag=0, date=None, - metadata=None): + def create(self, transaction, prec, succs=(), flag=0, parents=None, + date=None, metadata=None): """obsolete: add a new obsolete marker * ensuring it is hashable * check mandatory metadata * encode metadata @@ -290,11 +290,11 @@ class obsstore(object): if len(succ) != 20: raise ValueError(succ) if prec in succs: raise ValueError(_('in-marker cycle with %s') % node.hex(prec)) marker = (str(prec), tuple(succs), int(flag), encodemeta(metadata), - date, None) + date, parents) return bool(self.add(transaction, [marker])) def add(self, transaction, markers): """Add new markers to the store