[darcs-devel] [issue2598] task: issue warning when pending is inconsistent with working tree

Ben Franksen bugs at darcs.net
Mon Aug 27 08:37:52 UTC 2018


New submission from Ben Franksen <ben.franksen at online.de>:

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.

----------
messages: 20269
nosy: bf
status: unknown
title: task: issue warning when pending is inconsistent with working tree

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2598>
__________________________________


More information about the darcs-devel mailing list