# HG changeset patch # User Sean Farley # Date 2013-08-14 20:25:14 # Node ID 09459edfb48b6589dac869cccb46d34e957d1b1a # Parent cb0c94ef1ebeb18499254e0dbccf0a7d606b1625 commitablectx: move __str__ from workingctx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -856,6 +856,9 @@ class commitablectx(basectx): if self._extra['branch'] == '': self._extra['branch'] = 'default' + def __str__(self): + return str(self._parents[0]) + "+" + class workingctx(commitablectx): """A workingctx object makes access to data related to the current working directory convenient. @@ -869,9 +872,6 @@ class workingctx(commitablectx): changes=None): super(workingctx, self).__init__(repo, text, user, date, extra, changes) - def __str__(self): - return str(self._parents[0]) + "+" - def __nonzero__(self): return True