Steve Borho avatar Steve Borho committed b03a3e6

commit: mercurial wants branch names in UTF-8

Fixes #566

Comments (0)

Files changed (1)

         cmdline  = ['hg', 'commit', '--verbose', '--repository', self.repo.root]
         if self.nextbranch:
-            newbranch = hglib.fromutf(self.nextbranch)
-            if newbranch in self.repo.branchtags():
-                if newbranch not in [p.branch() for p in self.repo.parents()]:
+            if self.nextbranch in self.repo.branchtags():
+                if self.nextbranch in [p.branch() for p in self.repo.parents()]:
                     response = gdialog.Confirm(_('Confirm Override Branch'),
                             [], self, _('A branch named "%s" already exists,\n'
                         'override?') % self.nextbranch).run()
                 response = gdialog.Confirm(_('Confirm New Branch'), [], self,
                         _('Create new named branch "%s"?') % self.nextbranch).run()
             if response == gtk.RESPONSE_YES:
-                self.repo.dirstate.setbranch(newbranch)
+                self.repo.dirstate.setbranch(self.nextbranch)
             elif response != gtk.RESPONSE_NO:
         elif self.closebranch:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.