diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py --- a/hgext/git/dirstate.py +++ b/hgext/git/dirstate.py @@ -86,8 +86,8 @@ @util.propertycache def identity(self): - self.identity = util.filestat.frompath( - os.path.join(self.root, b'.git', b'index') + return util.filestat.frompath( + os.path.join(self._root, b'.git', b'index') ) def branch(self): diff --git a/hgext/git/manifest.py b/hgext/git/manifest.py --- a/hgext/git/manifest.py +++ b/hgext/git/manifest.py @@ -62,7 +62,7 @@ comps = upath.split('/') for comp in comps[:-1]: te = self._tree[comp] - t = self.gitrepo[te.id] + t = self._git_repo[te.id] ent = t[comps[-1]] if ent.filemode == pygit2.GIT_FILEMODE_BLOB: flags = b'' @@ -81,7 +81,7 @@ return self._resolve_entry(path) def __len__(self): - return len(list(self.walk())) + return len(list(self.walk(matchmod.always()))) def __nonzero__(self): try: @@ -91,7 +91,7 @@ return False def __bool__(self): - return self.__nonzero__(self) + return self.__nonzero__() def __contains__(self, path): try: @@ -175,7 +175,7 @@ realname = subdir + pycompat.fsencode(te.name) if te.type == r'tree': for inner in self._walkonetree( - self.gitrepo[te.id], match, realname + b'/' + self._git_repo[te.id], match, realname + b'/' ): yield inner if not match(realname):