[darcs-users] How to reset a file to an older state?
Matthias Fischmann
fis at wiwi.hu-berlin.de
Wed Apr 26 09:16:58 UTC 2006
On Wed, Apr 26, 2006 at 04:52:35AM -0400, Thomas Schwinge wrote:
> To: darcs-users at darcs.net
> From: Thomas Schwinge <tschwinge at gnu.org>
> Date: Wed, 26 Apr 2006 04:52:35 -0400
> Subject: Re: [darcs-users] How to reset a file to an older state?
>
> On Tue, Apr 25, 2006 at 05:31:46PM -0400, I wrote:
> > make F up to date again, possibly creating conflicts in F?
> >
> > [...]
> > darcs pull -a
>
> How would I (again: non-interactively) check if that pulling created
> conflicts? Parse `darcs pull's output? Ugly. Record the changes as
> they are, run `darcs revert -a', then `darcs resolve', followed by `darcs
> whatsnew F' afterwards and parse its output? Ugly. Or for the last
> `darcs whatsnew F' step, rather rely on the fact that it will return an
> exit value of `1' if there are no changes and `0' if there are changes
> (i.e. conflicts)? Ugly.
yes, parsing is a bad idea because the exact output syntax is not part
of the contract between programmers and users, and so it will probably
change over time.
> Am I the first one to try to use darcs non-interactively?
i don't know, but i had the feeling myself that the interface is not
particularly suited for scripting:
- revert being interactive only.
- no batch switch that makes darcs exit with an error code rather
than start asking questions if command line parameters are missing.
(this bit me a few times because i am making extensive use of the
emacs-make interface for talking to darcs.)
perhaps it's easier to put the functionality into the darcs code
rather than in some scripts? i have been thinking that it would be
nice to have a libdarcs project and an API that can be used to write
code that processes darcs repos.
cheers,
m.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20060426/e6b782af/attachment.pgp
More information about the darcs-users
mailing list