[darcs-users] Output from darcs changes.

Tommy Pettersson ptp at lysator.liu.se
Thu Jun 1 16:14:51 UTC 2006


On Wed, May 31, 2006 at 08:16:30AM -0700, Bryan Soto wrote:
> I'm
> not sure how it was created
[...]
> adddir ./facets
> addfile ./facets/AUTHORS
> rmfile ./facets/AUTHORS
> rmdir ./facets

Some old version of darcs did create these kind of patches.

> $ darcs changes --match "hash
> 20060228123411-6e6f6-d4013c17541b685dfc3315513d1386b1b8e6af79.gz"
> --xml-output --summ
[...]
> There are only removes listed, not adds.
[...]
> Would it be possible to either list both of the actions (the add and
> remove) in the summary or to have darcs see that the two changes
> basically offset and amount to no change and not list either action in
> the summary?

'Changes -v' shows both adds and removes, but 'Changes -s' shows
only the removes, so something is at least inconsistent.

Further, an f->g example that could also be reduced to nothing

  addfile ./f
  move ./f ./g
  rmfile ./g

shows with changes -s as

   ./f -> ./g
  A ./f
  R ./g

This is possibly also somewhat related to Ian's mail 'Patch
summaries and moves', about moves being sorted before adds.


The simples and safest solution looks like making changes -s
show both A and R.

The current behavior of darcs is to remove pairs of add/rm
before constructing the patch, so not showing them at all could
work too.

But then, the sequence of commands

  darcs add f
  darcs mv f g
  darcs remove g

is _not_ reduced in _darcs/patches/pending, so it will be
recorded as the patch f->g above.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list