From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: esr@thyrsus.com
Cc: Dan Nicolaescu <dann@ics.uci.edu>, emacs-devel@gnu.org
Subject: Re: New VC mode -- review request
Date: Thu, 04 Oct 2007 09:18:58 +0200 [thread overview]
Message-ID: <874ph7xs7x.fsf@ambire.localdomain> (raw)
In-Reply-To: <20071003170048.GB7014@thyrsus.com> (Eric S. Raymond's message of "Wed\, 3 Oct 2007 13\:00\:48 -0400")
() "Eric S. Raymond" <esr@thyrsus.com>
() Wed, 3 Oct 2007 13:00:48 -0400
Dan Nicolaescu <dann@ics.uci.edu>:
> > vc-rollback = C-x v c
>
> Do you have an implementation for this function for any
> backend? It would be interesting to see it.
There is one for SCCS in old VC if you want to look at it. I
think I at one point implemented it for one other backend, but
the code and concept were so dodgy that I decided it was best
shot through the head.
here is the implementation i use for cvs:
(defun ttn-cvs-cancel-version (file editable)
"Undo the most recent checkin of FILE then do \"cvs update\".
EDITABLE non-nil means do \"cvs edit\" afterwards."
(unless (and (stringp vc-mode)
(string= " CVS-" (substring vc-mode 0 5)))
(error "File locally modified, aborting"))
(let ((rev (substring vc-mode 5)))
(vc-cvs-command nil 0 file "admin" (concat "-o" rev))
(vc-cvs-command nil 0 file "update")
(when editable
(vc-cvs-command nil 0 file "edit"))))
(defun ttn-cvs-rollback (files)
;; Usage: (defalias 'vc-cvs-rollback 'ttn-cvs-rollback)
"Undo the most recent checkin of FILE then do \"cvs update\"."
(ttn-cvs-cancel-version (car files) nil))
although rollback and cancel-version, before that, are shunned, i
find them useful for lone-programmer (ttn-only) situations where
admin/recovery overhead for mistakes is tolerable. i think we
should provide them but continue to urge their avoidance for
shared-repo situations, however. the "we don't provide it because
you shouldn't do that" tone has always bothered me gutterally.
thi
next prev parent reply other threads:[~2007-10-04 7:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-03 10:35 New VC mode -- review request Eric S. Raymond
2007-10-03 14:31 ` Dan Nicolaescu
2007-10-03 17:00 ` Eric S. Raymond
2007-10-04 0:42 ` Dan Nicolaescu
2007-10-04 2:02 ` Eric S. Raymond
2007-10-04 2:14 ` Dan Nicolaescu
2007-10-09 14:55 ` Eric S. Raymond
2007-10-09 15:33 ` Dan Nicolaescu
2007-10-09 17:21 ` Eric S. Raymond
2007-10-04 7:18 ` Thien-Thi Nguyen [this message]
2007-10-03 21:32 ` Alexandru Harsanyi
2007-10-04 2:24 ` Dan Nicolaescu
2007-10-04 9:46 ` Alexandru Harsanyi
2007-10-04 9:51 ` Eli Zaretskii
2007-10-04 17:27 ` Richard Stallman
2007-10-04 20:32 ` David Kastrup
2007-10-04 2:02 ` Richard Stallman
2007-10-04 2:22 ` Eric S. Raymond
2007-10-05 16:12 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2007-10-05 12:15 Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ph7xs7x.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=esr@thyrsus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.