diff --git a/hgext3rd/gitlookup.py b/hgext3rd/gitlookup.py --- a/hgext3rd/gitlookup.py +++ b/hgext3rd/gitlookup.py @@ -4,22 +4,30 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -# -# This will look up hashes from an hg-git map file over the wire. Define the -# location of the map file with the gitlookup.mapfile config option, then use -# thus: -# -# - get the git equivalent of hg 47d743e068523a9346a5ea4e429eeab185c886c6 -# hg identify --id\ -# -r _gitlookup_hg_47d743e068523a9346a5ea4e429eeab185c886c6\ -# ssh://server/repo -# - get the hg equivalent of git 6916a3c30f53878032dea8d01074d8c2a03927bd -# hg identify --id\ -# -r _gitlookup_git_6916a3c30f53878032dea8d01074d8c2a03927bd\ -# ssh://server/repo -# -# This also provides client and server commands to download all the Git metadata -# via bundle2. + +''' extension that will look up hashes from an hg-git map file over the wire. + This also provides client and server commands to download all the Git + metadata via bundle2. Example usage: + + - get the git equivalent of hg 47d743e068523a9346a5ea4e429eeab185c886c6 + + hg identify --id -r\\ + _gitlookup_hg_47d743e068523a9346a5ea4e429eeab185c886c6\\ + ssh://server/repo + + - get the hg equivalent of git 6916a3c30f53878032dea8d01074d8c2a03927bd + + hg identify --id -r\\ + _gitlookup_git_6916a3c30f53878032dea8d01074d8c2a03927bd\\ + ssh://server/repo + +:: + + [gitlookup] + # Define the location of the map file with the mapfile config option. + mapfile = + +''' from mercurial import bundle2, exchange, encoding, extensions, hg from mercurial import localrepo, util, wireproto, error, registrar