Can you prevent default-push, but allow pull?
问题 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. 回答1: 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