From cfe9c6dc8a94e1bb59c8df2de480a2a6de83f86b Mon Sep 17 00:00:00 2001 From: Siddharth Agarwal Date: Tue, 1 Dec 2015 10:19:50 -0800 Subject: [PATCH] Backed out changeset 3df4d529a2f2 This was causing test-encoding.t to fail. --- hggit/git_handler.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hggit/git_handler.py b/hggit/git_handler.py index a64f1a78e2..9441ab41d1 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -19,7 +19,6 @@ from mercurial.i18n import _ 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 @@ class GitHandler(object): @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 = {}