https+auth: use a ~/.git-credentials file if it exists to fetch credentials In some situations we code the plain auth-less uri in the hgrc paths section (for convenience) and want to use a centrally-stored credentials file. Though it is possible to use the hgrc [auth] section, it would be also nice to access .git-credentials (still usefull for git direct access), avoiding double maintenance of credentials. This probably does not cover all possible situations with git credentials handling (a vast topic) but it provides a working base. closes 305
debuggitdir: add new command This is useful for interacting with the Git repository directly, either from shell scripts, the terminal, or perhaps an alias like this: [alias] git=!GIT_DIR=$(hg debuggitdir) git "$@" ...and with that, you can easily access features not offered by Dulwich such as `hg git gc`.
optimise writing the map file We currently write the map file to a BytesIO buffer, and _then_ write it to an atomic temporary file. However, the file is opened for atomic write, so the extra buffering doesn't really add anything other than overhead.
import: _always_ save the map after an import Pulls aren't done in a transaction, so you can safely interrupt them, and get a partial result. Unfortunately, the commit map isn't updated, so once you resume the pull, it'll begin at the start at same commit as last, rather than where interrupted. With this tiny change, I can interrupt and resume long-running pulls at leisure. There's no test, since writing the required infrastructure seems a bit overkill.
gitnodekw: do not crash on hg incoming when log template includes gitnode() Before this change, if the user's log template included a call to gitnode() to show the git commit hash, invoking "hg incoming" on a git repository that had at least one incoming change failed with: AttributeError: 'overlayrepo' object has no attribute 'githandler' Since an incoming changeset should already have well defined git commit hashes, there is no apparent reason for which "hg incoming" should not have this information already. This change is a workaround that removes any reference to the hg-git structures from the incoming changeset, thus merely avoiding the crash. Fixes #239 (https://foss.heptapod.net/mercurial/hg-git/-/issues/239)