I just got bitten by this.
I would argue that revert shouldn't allow reverting of newly-added files.
Perhaps it should complain, and suggest to the user that they use `darcs
remove':
> darcs rev file_not_recorded
Error: The file `file_not_recorded' has not been recorded in the
repository. If you want darcs to ignore the file, but *not* delete it in
the working directory, use `darcs remove file_not_recorded', otherwise
simply delete the file.
Darcs revert is for using darcs to undo changes that the user has made in
working, so revert is behaving as per its remit. I think that in this case,
its unlikely that a user would ever want or expect this behaviour...
|