문제

In my company some users are pushing stuff into the repo without specifying the branch, thus causing a few issues. Is there a way to force the -b option on mercurial so the user always needs to specify a branch when pushing? I mean, we could force a specific comment in the commit message. Can we do the same with the -b option?

도움이 되었습니까?

해결책

If pushing all pushable commits "causing a few issues" it's a problem of your workflow and (used additional) tools - because pushing all branches is default style for Mercurial and you must design processes, having this in mind and don't emulate ugly Git-style.

Yes, way to force -b in push exist (redefine push in [alias]), but it's wrong way

다른 팁

You could have them use a new enough version of mercurial, make them have their default phase of commits be 'secret' via

[phases]
new-commit = secret

in their .hgrc. As only changesets from the draft and public phase are shared, they would need to change the phase of those commits they plan to share prior to push. Accidential push of changesets added just for personal testing in other branches are thus easily avoided.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top