[darcs-users] post-hoc move

Lele Gaifax lele at nautilus.homeip.net
Fri Jul 31 13:31:19 UTC 2009

On Fri, 31 Jul 2009 13:57:52 +0100
Hamish Allan <hamish at gmail.com> wrote:

> Okay, let me revise my position to: I think it would be *really*
> useful to have a switch to darcs move so that I can type "darcs move
> -retrospectively $LOC1 $LOC2" after I've already moved $LOC1 to $LOC2.

That's exactly what's happening here, and AFAICT darcs always did the
right thing on the matter. I did not try your recipe, though.

    $ mkdir test
    $ cd test
    $ darcs init
    $ echo "foo" > a
    $ darcs add a
    $ darcs record -a -m "first"
    Finished recording patch 'first'
    $ echo "bar" > b
    $ darcs add b
    $ darcs record -a -m "second"
    Finished recording patch 'second'
    $ darcs move a a.txt
    $ mv b b.txt
    $ darcs move b b.txt
    $ darcs wha
    move ./a ./a.txt
    move ./b ./b.txt
    $ darcs rec -a -m "third"
    Finished recording patch 'third'

As you can see, both the explicit move of "a -> a.txt" and the
"retrospective" one "b -> b.txt" had the same effect on the recorded
patch, no new option is required IMHO.

ciao, lele.
nickname: Lele Gaifax    | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas    | comincerò ad aver paura di chi mi copia.
lele at nautilus.homeip.net |                 -- Fortunato Depero, 1929.

More information about the darcs-users mailing list