Skip to content
Snippets Groups Projects
Commit ab3c64db authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

gitnodekw: use githandler from repo

Since a fresh GitHandler is no longer created for every commit, this speeds up
the {gitnode} template massively.

For a repo with over 50,000 commits, the command

hg log -l 10 --template '{gitnode}\n'

speeds up from 2.4 seconds to 0.3.
parent b8fff2f4
No related branches found
No related tags found
No related merge requests found
......@@ -225,8 +225,7 @@
""":gitnode: String. The Git changeset identification hash, as a 40 hexadecimal digit string."""
node = args['ctx']
repo = args['repo']
git = GitHandler(repo, repo.ui)
gitnode = git.map_git_get(node.hex())
gitnode = repo.githandler.map_git_get(node.hex())
if gitnode is None:
gitnode = ''
return gitnode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment