##// END OF EJS Templates
rollback: write dirstate branch with correct encoding
Sune Foldager -
r17360:93583159 stable
parent child Browse files
Show More
@@ -1009,7 +1009,7 b' class localrepository(object):'
1009 util.rename(self.join('undo.dirstate'), self.join('dirstate'))
1009 util.rename(self.join('undo.dirstate'), self.join('dirstate'))
1010 try:
1010 try:
1011 branch = self.opener.read('undo.branch')
1011 branch = self.opener.read('undo.branch')
1012 self.dirstate.setbranch(branch)
1012 self.dirstate.setbranch(encoding.tolocal(branch))
1013 except IOError:
1013 except IOError:
1014 ui.warn(_('named branch could not be reset: '
1014 ui.warn(_('named branch could not be reset: '
1015 'current branch is still \'%s\'\n')
1015 'current branch is still \'%s\'\n')
@@ -44,6 +44,10 b' these should work'
44 marked working directory as branch \xe9 (esc)
44 marked working directory as branch \xe9 (esc)
45 (branches are permanent and global, did you want a bookmark?)
45 (branches are permanent and global, did you want a bookmark?)
46 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
46 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
47 $ hg -q rollback
48 $ HGENCODING=latin-1 hg branch
49 \xe9 (esc)
50 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
47 $ rm .hg/branch
51 $ rm .hg/branch
48
52
49 hg log (ascii)
53 hg log (ascii)
General Comments 0
You need to be logged in to leave comments. Login now