hg clone
sets up the default path, so that you can pull and push without specifying the url every time.
hg clone ssh://[email protected]/account/repository
But if you have an existing local repository and decide to share it on bitbucket, you won't get the default path setup for you.
hg push ssh://[email protected]/account/repository
Is there a command to set the default path or am I forced to manually edit .hg/hgrc?
hg folder keeps track of one repo only. If you've got one in your home directory it means your home directory is under version control.
hgrc of the user the web server runs as. As mentioned in hg help config , you have local, global, per-user, and system hgrc files. This user is second on the weekly GitLab leaderboard.
There isn't a command for this and there won't be one. One of the times this was suggested the primary author of Mercurial, Matt, tweeted:
What is it with coders who are intimidated by text-based config files? Like doctors that can't stand blood.
You can make the hg erc
command open up that editor by putting this in your personal .hgrc
:
[alias]
erc = !$EDITOR `$HG root`/.hg/hgrc
(that last from Steve Losh)
If you want to get fancy you could do a post-clone
hook that modifies the .hg\hgrc
file using sed or similar, but you'll not find that functionality in Mercurial any time soon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With