changeset 953:584961625a58

Backed out changeset a593069575bb This was causing test-encoding.t to fail.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 01 Dec 2015 10:19:50 -0800
parents a593069575bb
children 393bde462133
files hggit/git_handler.py
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -19,7 +19,6 @@
 from mercurial.node import hex, bin, nullid
 from mercurial import bookmarks
 from mercurial import commands
-from mercurial import encoding
 from mercurial import context, util as hgutil
 from mercurial import url
 
@@ -136,18 +135,12 @@
 
     @hgutil.propertycache
     def git(self):
-        # Dulwich is going to try and join unicode ref names against
-        # the repository path to try and read unpacked refs. This
-        # doesn't match hg's bytes-only view of filesystems, we just
-        # have to cope with that. To cope, just decode the gitdir path
-        # in the local encoding and say a prayer that it decodes.
-        gitpath = self.gitdir.decode(encoding.encoding, encoding.encodingmode)
         # make the git data directory
         if os.path.exists(self.gitdir):
-            return Repo(gitpath)
+            return Repo(self.gitdir)
         else:
             os.mkdir(self.gitdir)
-            return Repo.init_bare(gitpath)
+            return Repo.init_bare(self.gitdir)
 
     def init_author_file(self):
         self.author_map = {}