Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top