mq: have the strip command functionnal on repo without mq
This is the last step before being able to extract `strip` in its own extension.
The changes are made in mq to allow a move only extraction without touching a
line of code.
mq: drop the use of mq.queue.qparent in mq.queue.strip
Same as in the previous changeset, rev is never `None`. We can just copy the two
relevant lines in in `queue.strip`. This help having `queue.strip` independent
from `queue`. One further step toward the extraction of `strip` in an independent
extension. (As discussed in
issue3824).
mq: drop the use of mq.queue.qparent in mq.strip
In this case, rev is never `None`. We can just copy the two relevant lines in
in `strip`. This help having `strip` independent from `queue` one
further step toward its extraction in an independent extension. (As
discussed in
issue3824).
mq: document repo.mq.qparents
The function is not very complex but writing this doc helped me to check if
I got everything right.
mq: use the new checklocalchange in the strip command
The strip command never use the `refresh` argument. So we can use the function
we just extracted.
mq: extract checklocalchanges from `mq.queue`
The core part of `checklocalchanges` is now mq independent. We can extract it in
a standalone function to help the extraction of `strip` as discussed in
issue3824.
A `checklocalchanges` function stay in `mq.queue` with the part related to
"refresh first" messages.
mq: extract checksubstate from the queue class
This function does not need any of the the `mq.queue` method or attributes. It
is indirectly used by the `strip` command. We are trying to extract this command
in a standalone extension as discussed in issue
issue3824.