hgext/git/__init__.py
branchstable
changeset 49384 3b8fce9a74df
parent 49077 20d151e43429
child 50776 39eb3aab3e63
--- a/hgext/git/__init__.py	Mon Jul 11 09:50:32 2022 +0200
+++ b/hgext/git/__init__.py	Mon Jul 04 15:01:52 2022 +0400
@@ -204,7 +204,9 @@
 
     @active.setter
     def active(self, mark):
-        githead = mark is not None and (_BMS_PREFIX + mark) or None
+        githead = None
+        if mark is not None:
+            githead = _BMS_PREFIX + pycompat.fsdecode(mark)
         if githead is not None and githead not in self.gitrepo.references:
             raise AssertionError(b'bookmark %s does not exist!' % mark)
 
@@ -254,7 +256,7 @@
                 )
 
     def checkconflict(self, mark, force=False, target=None):
-        githead = _BMS_PREFIX + mark
+        githead = _BMS_PREFIX + pycompat.fsdecode(mark)
         cur = self.gitrepo.references['HEAD']
         if githead in self.gitrepo.references and not force:
             if target: