# HG changeset patch # User Sean Farley # Date 2013-08-14 21:23:02 # Node ID 54b3b4821bfb613441b598a5af4ec5ee379c8ac4 # Parent e189c8ff33d38c386aae2e9d769d637ffc27b8d9 commitablectx: move branch from workingctx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -987,6 +987,8 @@ class commitablectx(basectx): def clean(self): assert self._clean is not None # must call status first return self._clean + def branch(self): + return encoding.tolocal(self._extra['branch']) class workingctx(commitablectx): """A workingctx object makes access to data related to @@ -1014,8 +1016,6 @@ class workingctx(commitablectx): p = p[:-1] return [changectx(self._repo, x) for x in p] - def branch(self): - return encoding.tolocal(self._extra['branch']) def closesbranch(self): return 'close' in self._extra def extra(self):