[PATCH 2 of 7 V2 apply on date fix] obsstore: add a `parents` argument to obsstore.create
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Aug 19 12:53:38 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1408403549 25200
# Mon Aug 18 16:12:29 2014 -0700
# Node ID 938d989ba1dfaa0b67dc26a49c6b07ebf58a8a06
# Parent 29f8c47a0222be4b34a13394af03ac3319042778
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
@@ -263,12 +263,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
@@ -293,11 +293,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
More information about the Mercurial-devel
mailing list