[darcs-users] darcs patch: refactor of SelectChanges (and 1 more)

Florent Becker florent.becker at ens-lyon.org
Sat Oct 11 11:18:24 UTC 2008


trentbuck at gmail.com (Trent W. Buck) writes:
[About --dont-prompt-for-dependencies]
> Is it the opposite of --ask-deps?  If so, I suggest --no-ask-deps.

It's not at all related to ask-deps (note that --no-ask-deps already
exists). Let me explain what it does in more details.

Suppose you issue the following commands in a repository:

touch toto
darcs record -am 'depended patch i dont care about'
echo titi > toto
darcs record -am 'patch i want'
touch tutu
darcs record -am 'patch i do not want'

Suppose you try to darcs pull from this repository, in order to get the
'patch i want', and want to use -p 'want' to choose interactively
between the last two patches. This could be realistic for instance if
there are many other unrelated patches in the repo, and maybe also
'patch i want' in fact depends on many patches you don't care about.

You have three possibilities

1/ With --prompt-for-dependencies (the default behaviour, which now has
its own flag).  You get asked about all three patches: the last two
ones, because they match the -p, and the first one because the second
depends on it. If the two matching patches depend on many patches, this
can get impratical, and counter-intuitive (why is darcs coming up with a
patch that does not patch the -p i gave?)

2/ With --no-deps: you only get to pull the last patch, because the
second one has a dependency that does not match the -p. This does not work
this case :-(

3/ The new --dont-prompt-for-deps. You get asked about only the last two
patches. If you answer 'y' to 'patch i want', then 'depended patch i
dont care about' gets silently pulled.

Hope this helps

Florent



More information about the darcs-users mailing list