Issue 2598 task: issue warning when pending is inconsistent with working tree

Title task: issue warning when pending is inconsistent with working tree
Priority Status unknown
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To

Created on 2018-08-27.08:37:52 by bfrk, last changed 2018-08-27.08:37:52 by bfrk.

msg20269 (view) Author: bfrk Date: 2018-08-27.08:37:50
Patch1711 fixes issue2548 where this siituation could lead to
inconsistent patches and clearly specifies the behavior: if pending and
the working tree are inconsistent, the state of the working tree takes
priority. Due to coalescing of primitive changes from pending and
working, the original (inconsistent) adds in pending are effectively
discarded and replaced with adds that are consistent with the working tree.

While this is clearly an improvement over what we had before, the
behavior might still be unexpected. I tried the example with mercurial:
it refuses to commit such a state and complains that the originally
added file/dir is missing. It is unclear how to recover from this
situation except by removing the offending object and re-adding the
original, then removing it with 'hg remove', which I think this is a bit
unfriendly. The current (new) behavior in Darcs is superior, but perhaps
we should issue a warning like

"You added f as a file but I am adding it now as a directory."

It is unclear, however, how to detect that in the amend and record commands.
Date User Action Args
2018-08-27 08:37:52bfrkcreate