diff -r 05ac42e56452 -r deaeb2d84d8a mercurial/hg.py --- a/mercurial/hg.py Mon Jun 07 16:28:23 2010 +0200 +++ b/mercurial/hg.py Tue Jun 08 13:19:22 2010 +0200 @@ -30,8 +30,10 @@ if branch == '.': if not lrepo or not lrepo.local(): raise util.Abort(_("dirstate branch not accessible")) - branch = lrepo.dirstate.branch() - butf8 = encoding.fromlocal(branch) + butf8 = lrepo.dirstate.branch() + branch = encoding.tolocal(butf8) + else: + butf8 = encoding.fromlocal(branch) if butf8 in branchmap: revs.extend(node.hex(r) for r in reversed(branchmap[butf8])) else: