diff mercurial/localrepo.py @ 3862:46abbed02b2d

Use UTF-8 in .hg/branch
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 10 Dec 2006 20:35:28 -0200
parents db36a4f490f6
children 1e0b94cfba0e 27230c29bfec
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun Dec 10 23:03:53 2006 +0100
+++ b/mercurial/localrepo.py	Sun Dec 10 20:35:28 2006 -0200
@@ -683,7 +683,11 @@
         m2 = self.manifest.read(c2[0])
 
         if use_dirstate:
-            branchname = util.fromlocal(self.workingctx().branch())
+            branchname = self.workingctx().branch()
+            try:
+                branchname = branchname.decode('UTF-8').encode('UTF-8')
+            except UnicodeDecodeError:
+                raise util.Abort(_('branch name not in UTF-8!'))
         else:
             branchname = ""