mercurial/hg.py
changeset 11312 3f1409082720
parent 11300 24eeca1f2791
parent 11306 deaeb2d84d8a
child 11322 3d6915f5a2bb
--- a/mercurial/hg.py	Tue Jun 08 15:52:56 2010 -0500
+++ b/mercurial/hg.py	Tue Jun 08 15:57:59 2010 -0500
@@ -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: