A friend asked if it is possible to set the default place where users checkout Mercurial modules from? CVS has a the environment variable CVSROOT, which is used by default.
A friend asked if it is possible to set the default place where users
Share
There is nothing that directly matches the
CVSROOTvariable in Mercurial, so you won’t find aHGROOTenvironment variable inhg help env.But you can do something similar with the schemes extension. It lets you define new URL schemes that act as shortcuts for longer URLs. So if you often type:
then you can load the extension and instead type
The
bb://scheme is a default scheme in the extension. These schemes work whereever you can give Mercurial a URL, so you can push/pull with them too.You can add your own schemes with something like
and then use
hg pull x://footo pull from your/mnt/server/var/repos/foorepository.From a comment of yours, it’s not clear if you’re really after shorthands when you
hg pull. They can be created by adding entries to the[paths]section, seehg help paths. If you addthen you can run
hg pull footo pull fromsomewhere.