[PATCH 4 of 9 RFC] localrepo: add a method to return markers in a namespace
Matt Mackall
mpm at selenic.com
Wed Apr 2 15:18:22 UTC 2014
On Mon, 2014-03-31 at 17:41 +0000, David Soria Parra wrote:
> Sean Farley <sean.michael.farley at gmail.com> writes:
>
> > # HG changeset patch
> > # User Sean Farley <sean.michael.farley at gmail.com>
> > # Date 1396218396 18000
> > # Sun Mar 30 17:26:36 2014 -0500
> > # Node ID 0c5c36fe392d9dfbc56ac466e312a62bdeb2bf93
> > # Parent 1bb668ecda482ee83f31d505c2094e6402668931
> > localrepo: add a method to return markers in a namespace
> >
> > diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> > --- a/mercurial/localrepo.py
> > +++ b/mercurial/localrepo.py
> > @@ -671,10 +671,37 @@ class localrepository(object):
> > RFC: should we allow tags and bookmarks to be set this way?
> > '''
> > self._createmarkernamespace(namespace)
> > self._markers[namespace][name] = node
> >
> > + def markers(self, namespace=None, name=None):
> > + '''Return markers in the namespace, otherwise return all markers.
> > +
> > + If namespace is None, this will return a dictionary of dictionaries.
> > +
> > + If namespace is passed but name is None, this function will return a
> > + dictionary.
> > +
> > + If both namespace and name are passed, this will return a value.
This is a bit too polymorphic an API: it has three return types (dict of
dicts, dict, and value).
--
Mathematics is the supreme nostalgia of our time.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list