# HG changeset patch # User Sean Farley # Date 1376511898 18000 # Node ID cb0c94ef1ebeb18499254e0dbccf0a7d606b1625 # Parent 61dcb2aa737890cf0e1d28fb33115ee611b1f7d7 commitablectx: move __init__ from workingctx diff -r 61dcb2aa7378 -r cb0c94ef1ebe mercurial/context.py --- 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]) + "+"