diff -r d3ebb1a0bc49 -r 05ac42e56452 mercurial/hg.py --- a/mercurial/hg.py Tue Jun 01 18:29:52 2010 -0400 +++ b/mercurial/hg.py Mon Jun 07 16:28:23 2010 +0200 @@ -30,13 +30,12 @@ if branch == '.': if not lrepo or not lrepo.local(): raise util.Abort(_("dirstate branch not accessible")) - revs.append(lrepo.dirstate.branch()) + branch = lrepo.dirstate.branch() + butf8 = encoding.fromlocal(branch) + if butf8 in branchmap: + revs.extend(node.hex(r) for r in reversed(branchmap[butf8])) else: - butf8 = encoding.fromlocal(branch) - if butf8 in branchmap: - revs.extend(node.hex(r) for r in reversed(branchmap[butf8])) - else: - revs.append(branch) + revs.append(branch) return revs, revs[0] def parseurl(url, branches=None):