--- a/mercurial/hg.py Wed Nov 24 15:38:52 2010 -0600
+++ b/mercurial/hg.py Wed Nov 24 15:56:32 2010 -0600
@@ -32,24 +32,22 @@
return revs, revs[0]
branchmap = repo.branchmap()
- def primary(butf8):
- if butf8 == '.':
+ def primary(branch):
+ if branch == '.':
if not lrepo or not lrepo.local():
raise util.Abort(_("dirstate branch not accessible"))
- butf8 = lrepo.dirstate.branch()
- if butf8 in branchmap:
- revs.extend(node.hex(r) for r in reversed(branchmap[butf8]))
+ branch = lrepo.dirstate.branch()
+ if branch in branchmap:
+ revs.extend(node.hex(r) for r in reversed(branchmap[branch]))
return True
else:
return False
for branch in branches:
- butf8 = encoding.fromlocal(branch)
- if not primary(butf8):
+ if not primary(branch):
raise error.RepoLookupError(_("unknown branch '%s'") % branch)
if hashbranch:
- butf8 = encoding.fromlocal(hashbranch)
- if not primary(butf8):
+ if not primary(hashbranch):
revs.append(hashbranch)
return revs, revs[0]
@@ -365,8 +363,7 @@
except error.RepoLookupError:
continue
bn = dest_repo[uprev].branch()
- dest_repo.ui.status(_("updating to branch %s\n")
- % encoding.tolocal(bn))
+ dest_repo.ui.status(_("updating to branch %s\n") % bn)
_update(dest_repo, uprev)
return src_repo, dest_repo