From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: VC command for showing outgoing changes Date: Tue, 13 Oct 2009 14:15:31 -0700 (PDT) Message-ID: <200910132115.n9DLFVRX015392@godzilla.ics.uci.edu> References: <200910132024.n9DKOHGj015040@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255468656 23071 80.91.229.12 (13 Oct 2009 21:17:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2009 21:17:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 23:17:25 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MxokF-0008Du-9b for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2009 23:17:24 +0200 Original-Received: from localhost ([127.0.0.1]:57650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxokE-0007SX-EO for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2009 17:17:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mxok9-0007Rw-8D for emacs-devel@gnu.org; Tue, 13 Oct 2009 17:17:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mxok3-0007RG-FF for emacs-devel@gnu.org; Tue, 13 Oct 2009 17:17:15 -0400 Original-Received: from [199.232.76.173] (port=36554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mxok3-0007RB-9e for emacs-devel@gnu.org; Tue, 13 Oct 2009 17:17:11 -0400 Original-Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]:59922) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mxok2-00086c-64 for emacs-devel@gnu.org; Tue, 13 Oct 2009 17:17:11 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id n9DLFVac002814; Tue, 13 Oct 2009 14:15:31 -0700 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n9DLFVRX015392; Tue, 13 Oct 2009 14:15:31 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 13 Oct 2009 16:52:18 -0400") Original-Lines: 47 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: n9DLFVac002814 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116119 Archived-At: Stefan Monnier writes: > > It would be nice to have a VC command for showing the outgoing changes > > for distributed VC systems (i.e. the log of the changes that will be > > pushed when you do a VC push). > > Let's call this method vc-outgoing (name suggestions are welcome). > > I think before that we should have support for a `push' backend operation. You mean as a precondition of doing vc-outgoing? I'd like to avoid tangling the two. vc-outgoing should be easy, and similar to what we already do for `print-log', I am not so sure about `push'. I think vc-outgoing can be useful even without a push operation, just for showing the log and examining diffs. > > vc-outgoing cannot quite use that because most commands that are defined > > for log-view-mode do not make sense (annotate, next/previous file, show > > version). > > The next/previous file seem to make just as much (or as little) sense > for this as for log-view. Also, why don't annotate and show-version > make sense? These are tree level operations, annotate and show-version work on files. (Especially annotate, it's code really really wants a file) And yes, show-version and annotate do not really make much sense for anything that is not a single file log (directory logs, or multiple file logs). > > One thing we can do is to create a log-view-base-mode and have > > log-view-mode and log-view-outgoing-mode derive from this mode, and have > > log-view-mode and log-view-outgoing-mode define their own commands and > > key bindings. > > Since each backend typically creates its own vc--log-view-mode, > that tend to lead to the need for "multiple inheritance" in > define-derived-mode. Given the lack of support for such a monster right > now, we should probably stick to something simpler, e.g. add > a log-view-outgoing binary var, behaving kind of like a minor-mode and > controlling availability of some extra bindings. I am not so sure there's a need for multiple inheritance, backends could create vc--log-view-mode and vc--outgoing-mode derived from log-view-mode and log-view-outgoing-mode, respectively. It might not be too complicated to try to (at least partially) implement both your and my proposals and see which ones looks cleaner.