changeset 17361:5e276d1d504a

merge with stable
author Sune Foldager <cryo@cyanite.org>
date Wed, 15 Aug 2012 12:12:21 +0200
parents d7753a0bb0cd (current diff) 935831597e16 (diff)
children ff3c89cf1477
files tests/test-encoding.t
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Aug 14 08:12:09 2012 -0700
+++ b/mercurial/localrepo.py	Wed Aug 15 12:12:21 2012 +0200
@@ -1009,7 +1009,7 @@
             util.rename(self.join('undo.dirstate'), self.join('dirstate'))
             try:
                 branch = self.opener.read('undo.branch')
-                self.dirstate.setbranch(branch)
+                self.dirstate.setbranch(encoding.tolocal(branch))
             except IOError:
                 ui.warn(_('named branch could not be reset: '
                           'current branch is still \'%s\'\n')
--- a/tests/test-encoding.t	Tue Aug 14 08:12:09 2012 -0700
+++ b/tests/test-encoding.t	Wed Aug 15 12:12:21 2012 +0200
@@ -44,6 +44,10 @@
   marked working directory as branch \xe9 (esc)
   (branches are permanent and global, did you want a bookmark?)
   $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
+  $ hg -q rollback
+  $ HGENCODING=latin-1 hg branch
+  \xe9 (esc)
+  $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
   $ rm .hg/branch
 
 hg log (ascii)