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.