Mercurial > hg
changeset 19665:cb0c94ef1ebe
commitablectx: move __init__ from workingctx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Aug 2013 15:24:58 -0500 |
parents | 61dcb2aa7378 |
children | 09459edfb48b |
files | mercurial/context.py |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Wed Aug 14 15:02:08 2013 -0500 +++ b/mercurial/context.py Wed Aug 14 15:24:58 2013 -0500 @@ -826,19 +826,6 @@ wants the ability to commit, e.g. workingctx or memctx.""" def __init__(self, repo, text="", user=None, date=None, extra=None, changes=None): - pass - -class workingctx(commitablectx): - """A workingctx object makes access to data related to - the current working directory convenient. - date - any valid date string or (unixtime, offset), or None. - user - username string, or None. - extra - a dictionary of extra values, or None. - changes - a list of file lists as returned by localrepo.status() - or None to use the repository status. - """ - def __init__(self, repo, text="", user=None, date=None, extra=None, - changes=None): self._repo = repo self._rev = None self._node = None @@ -869,6 +856,19 @@ if self._extra['branch'] == '': self._extra['branch'] = 'default' +class workingctx(commitablectx): + """A workingctx object makes access to data related to + the current working directory convenient. + date - any valid date string or (unixtime, offset), or None. + user - username string, or None. + extra - a dictionary of extra values, or None. + changes - a list of file lists as returned by localrepo.status() + or None to use the repository status. + """ + def __init__(self, repo, text="", user=None, date=None, extra=None, + changes=None): + super(workingctx, self).__init__(repo, text, user, date, extra, changes) + def __str__(self): return str(self._parents[0]) + "+"