[darcs-users] Re: Programmatic invocation
Juliusz Chroboczek
Juliusz.Chroboczek at pps.jussieu.fr
Thu Nov 17 19:03:11 UTC 2005
> However, IMHO YMMV the Darcs UI is not very good for non-interactive
> use. For example, --patch names are much too fuzzy, while I haven't
> found a good way to get unique patch names (ie, that you can feed to
> --match 'hash XXXX').
darcs changes --xml (which is used extensively in vc-darcs.el)
> Also, I find that the interactive modes are incredibly helpful in
> disentangling mixed-up changes. I suspect it would be rather hard
> to emulate those without passing darcs prompts back to the user.
No, you just need to define some specific non-interactive commands for
Darcs. This is, I believe, what Daniel Lutz was hinting at.
Here's an outline of what could be done, taking record as an example.
Add three new (sub)commands:
darcs batch take-lock
darcs batch release-lock
darcs batch whatsnew
darcs batch record
The locking commands should be self-explanatory. Batch whatsnew would
give a numbered list of hunks, in an easy to parse format.
Batch record is like record, but it doesn't take a lock (assumed to
already have been taken by an explicit take-lock), and instead of
being interactive, takes a subset of the hunk indices produced by
batch whatsnew.
A GUI for darcs record would then issue the following commands:
- darcs batch take-lock;
- darcs batch whatsnew;
- allow the user to select the hunks he wants to record and enter a
log message;
- darcs batch record, with the list of hunks computed in the
previous step;
- darcs batch release-lock.
If somebody is willing to implement the GUI, I'm willing to implement
darcs batch.
Juliusz
More information about the darcs-users
mailing list