[darcs-users] unexpected(?) behaviour..

Peter Strand d98peter at dtek.chalmers.se
Tue Jul 8 09:04:01 UTC 2003


If a patch is duplicated, the result seems to be that the
change is not applied at all..  Which confused me a bit ;)
I would have expected either complaining or that the second 
patch was ignored.


Example:

$ mkdir t1
$ cd t1
$ darcs inittree
Successfully initialized tree!
$ touch foo
$ darcs add foo
$ darcs record -a -m add   # create a repo with a single file
There is test.
Finished recording patch 'add'
$ echo 1 >> foo
$ darcs record -a -m mod   # and a modification to it
There is test.
Finished recording patch 'mod'
$ cd ..
$ darcs get -o t2 t1       # mirror this repo
Finished getting.
$ cd t2
$ cat foo                  # verify that the modification exist
1
$ cd ../t1
$ echo y | darcs unpull    # we thought we didn't like the modification..
Considering unpulling patch:
[mod
peter at zarquon.se**Tue Jul  8 10:42:49 CEST 2003] 
Unpull this patch? Finished unpulling.
$ echo 1 >> foo             # .. but changed our mind
$ darcs record -a -m mod_again
There is test.
Finished recording patch 'mod_again'
$ cd ../t2
$ # here I "forget" to unpull "mod"
$ # echo y | darcs unpull  # if this is executed, I get the expected result.. 
$ darcs pull -a ../t1      # update..
So far so good... the merge succeeded.
Finished pulling.
$ cat foo                  # empty!?
$

t2 contains both mod and mod_again, but the result is an empty foo


/Peter





More information about the darcs-users mailing list