From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: pcvs branch and merge functions Date: Mon, 02 Aug 2010 15:19:20 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280755184 17517 80.91.229.12 (2 Aug 2010 13:19:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 13:19:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Arik Mitschang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 02 15:19:41 2010 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.69) (envelope-from ) id 1Ofuvb-00048f-SA for ged-emacs-devel@m.gmane.org; Mon, 02 Aug 2010 15:19:40 +0200 Original-Received: from localhost ([127.0.0.1]:55102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofuvb-0001jW-6z for ged-emacs-devel@m.gmane.org; Mon, 02 Aug 2010 09:19:39 -0400 Original-Received: from [140.186.70.92] (port=50188 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfuvR-0001hm-AH for emacs-devel@gnu.org; Mon, 02 Aug 2010 09:19:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfuvM-0002wJ-2b for emacs-devel@gnu.org; Mon, 02 Aug 2010 09:19:29 -0400 Original-Received: from impaqm5.telefonica.net ([213.4.138.5]:19665) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfuvL-0002vv-RJ for emacs-devel@gnu.org; Mon, 02 Aug 2010 09:19:24 -0400 Original-Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm5.telefonica.net with bizsmtp id pMBB1e00X0r0BT63RRKNCn; Mon, 02 Aug 2010 15:19:22 +0200 Original-Received: from ceviche.home ([83.61.38.247]) by IMPmailhost2.adm.correo with BIZ IMP id pRKL1e00K5KwfZf1iRKMRr; Mon, 02 Aug 2010 15:19:22 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id B653D66125; Mon, 2 Aug 2010 15:19:20 +0200 (CEST) In-Reply-To: (Arik Mitschang's message of "Sun, 11 Jul 2010 13:45:13 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:128111 Archived-At: > I propose adding the branch and merge functionality that I have added > to pcvs, which can be viewed with 'bzr branch > lp:~akwm/emacs/pcvs-branch-and-merge'. It simplifies creating a branch For this kind of size, it's good to include the diff directly in the email so that we can review it without needing an internet connection and a bunch of commands. > Any thoughts? Here are some comments on your code: - please try and follow the coding style used in the rest of the code. Most obviously: don't put close-parens on their own lines, and avoid breaking the 80-columns barrier. - why cvs-branch-tag-branch-postfix? I mean if I name the branch "foo", I don't want Emacs to rename it to "foo-BRANCH", do I? - ("\C-m" . cvs-mode-merge) binds it to RET (since it's the same as ^M), which is already used for something else. - don't use a global var like cvs-branch-name to pass an argument from the `interactive' spec to the function's body. Use an actual argument instead. - I wouldn't bother supporting the case where cvs-branch-tag-base-postfix is nil. - cvs-mode-merge should provide completion of branch names. Otherwise you might as well use C-u M-x cvs-mode-update and type the -j yourself. - I think (if (and (not (equal branch-tag merge-tag)) (not (null cvs-branch-tag-merge-postfix))) (cvs-mode-run "update" (list "-j" branch-tag) fis) (cvs-mode-run "update" (list "-j" branch-tag) fis)) is equivalent to (cvs-mode-run "update" (list "-j" branch-tag) fis)) BTW. Maybe an even better option would be to provide completion after "-j" and "-r" when you do c-x M-x cvs-mode-update. - You might be able to move the -MERGE tag automatically by creating (at the end of cvs-mode-merge) a special file in the CVS admin dir which would hold some info about the result of the merge, and then in cvs-mode-commit you can check this file to see if the commit is committing the result of the merge or something else. Maybe the simplest way is an empty file, and upon commit you simply ask the user (if the file is present) if he's committing that merge. -- Stefan