Reputation: 6326
Mercurial Queues recently got a new feature, which allows mq patches to be pushed and popped when there are local changes, provided the patches don't conflict with the local changes. This is controlled by the --keep-changes
flag. I'd like to make this behavior the default. Generally, I avoid setting defaults, since that would mean hg
works differently on my machine than on other machines, but in this case it seems harmless.
hg help qpop
says, for example
With --keep-changes, abort only if the uncommitted files overlap with
patched files.
[...]
--keep-changes tolerate non-conflicting local changes
So, can someone tell what to put in .hgrc
so that --keep-changes
is default for qpush
and qpop
?
See Bug 2780 - qpop should work if the local changes and the mq patches are unrelated for the history of this feature. It is possible there is no option to set this, in which case it is less useful. There isn't even a one letter alias.
Upvotes: 3
Views: 392
Reputation: 7755
The defaults section of hgrc should do what you want (untested though):
[defaults]
qpush = --keep-changes
qpop = --keep-changes
But.... defaults are "depreciated", and people are encouraged to use aliases instead. I don't think that will mean they disappear though, it would "break work-flows" which is a mortal sin in mercurial development.
Upvotes: 2
Reputation: 97295
Read about alias section and pay special attention to note in this chapter
Note
It is possible to create aliases with the same names as existing commands, which will then override the original definitions. This is almost always a bad idea!
Upvotes: 0