I want to know if there's a way to turn off the default push, but keep the default pull when using Mercurial. I don't want to accidentally pollute the master repository by inadvertently pushing from an experimental repository.
I was able to solve this by putting the following in my .hg/hgrc
file, but I was wondering if there's a better/official way.
[paths]
default = http://server/hg/repo
default-push = .
Your solution probably is the quickest and is certainly effective. If there's any official way it would be using a preoutgoing
hook:
[hooks]
preoutgoing = bash -c 'read -p "Really push to $HG_URL? " -n 1 RESP ; [ "$RESP" == "y" ]'
which will ask you if you want to push and provide the URL to which it would go as a reminder.
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