Backed out changeset 3df4d529a2f2

This was causing test-encoding.t to fail.
This commit is contained in:
Siddharth Agarwal 2015-12-01 10:19:50 -08:00
parent 28aa302374
commit cfe9c6dc8a

View File

@ -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 = {}