Mercurial > hg-stable
diff mercurial/context.py @ 4179:7e1c8a565a4f
Move branch read/write to dirstate where it belongs
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 13 Mar 2007 18:50:02 -0500 |
parents | 0b48e3985765 |
children | dbc3846c09a1 b6146466b92a |
line wrap: on
line diff
--- a/mercurial/context.py Tue Mar 13 15:47:55 2007 -0500 +++ b/mercurial/context.py Tue Mar 13 18:50:02 2007 -0500 @@ -411,11 +411,7 @@ def deleted(self): return self._status[3] def unknown(self): return self._status[4] def clean(self): return self._status[5] - def branch(self): - try: - return self._repo.opener("branch").read().strip() or "default" - except IOError: - return "default" + def branch(self): return self._repo.dirstate.branch() def parents(self): """return contexts for each parent changeset"""