Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jan 2020 15:20:12 -0800] rev 44162
copies: move early return in mergecopies() earlier
It wasn't obvious that the early return happened only when there are
no copies. That is the case, however, because if `fullcopy` is empty,
then so is `copies1` and `copies2`, and then so is `inversecopies1`
and `inversecopies2`, and then so is `allsources`, and then so is
`copy`, `diverge` and `renamedelete`.
By moving the early return earlier, we also avoid calculating the set
of added files from the base to each side.
Differential Revision: https://phab.mercurial-scm.org/D7975
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 07:00:45 -0800] rev 44161
tests: test merge of renames of different sources to same target
This is a really obscure scenario, but let's still have it tested so
we know when it changes.
Differential Revision: https://phab.mercurial-scm.org/D7985
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 09:33:02 -0800] rev 44160
clean: check that there are no conflicts after
As noted by Pulkit, there should never be any conflicts after doing a
clean update, so `hg.clean()` should never return `True`. Let's check
that assertion instead to clarify the code. The callers will now get a
`None` instead of a `False` returned, but that should be fine (both
result in a 0 exit status).
Differential Revision: https://phab.mercurial-scm.org/D7984