comparison mercurial/localrepo.py @ 17360:935831597e16 stable

rollback: write dirstate branch with correct encoding
author Sune Foldager <cryo@cyanite.org>
date Wed, 15 Aug 2012 12:04:50 +0200
parents 9f94358f9f93
children b05e517c2236 17c3dbf3026f
comparison
equal deleted inserted replaced
17353:bde1185f406c 17360:935831597e16
1007 parents[1] not in self.changelog.nodemap) 1007 parents[1] not in self.changelog.nodemap)
1008 if parentgone: 1008 if parentgone:
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')
1016 % self.dirstate.branch()) 1016 % self.dirstate.branch())
1017 1017