From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.devel Subject: Re: Please don't use revision numbers on commit messages (and elsewhere). Date: Sun, 03 Apr 2011 09:00:38 +0100 Message-ID: References: <877hbfvwyo.fsf@wanadoo.es> <87sju2hoee.fsf@ambire.localdomain> <87pqp6vn3p.fsf@wanadoo.es> <874o6iicxp.fsf@ambire.localdomain> <83mxkapb2g.fsf@gnu.org> <87zkoat20x.fsf@wanadoo.es> <83liztyeed.fsf@gnu.org> <87ipuxu3hb.fsf@wanadoo.es> <87aag9tt7e.fsf@wanadoo.es> <87hbagsr1x.fsf@wanadoo.es> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1301817686 31961 80.91.229.12 (3 Apr 2011 08:01:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Apr 2011 08:01:26 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 03 10:01:19 2011 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 1Q6IFH-0007x0-C2 for ged-emacs-devel@m.gmane.org; Sun, 03 Apr 2011 10:01:15 +0200 Original-Received: from localhost ([127.0.0.1]:56795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6IFE-00014L-9t for ged-emacs-devel@m.gmane.org; Sun, 03 Apr 2011 04:01:12 -0400 Original-Received: from [140.186.70.92] (port=52439 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6IF3-00012r-HY for emacs-devel@gnu.org; Sun, 03 Apr 2011 04:01:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6IEy-00009K-Mn for emacs-devel@gnu.org; Sun, 03 Apr 2011 04:01:01 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:42604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6IEy-00008t-Cs for emacs-devel@gnu.org; Sun, 03 Apr 2011 04:00:56 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q6IEu-0007qb-7a for emacs-devel@gnu.org; Sun, 03 Apr 2011 10:00:52 +0200 Original-Received: from cpc10-harb6-0-0-cust112.perr.cable.virginmedia.com ([92.232.137.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Apr 2011 10:00:52 +0200 Original-Received: from u.s.reddy by cpc10-harb6-0-0-cust112.perr.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Apr 2011 10:00:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc10-harb6-0-0-cust112.perr.cable.virginmedia.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <87hbagsr1x.fsf@wanadoo.es> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:138084 Archived-At: On 4/2/2011 2:47 PM, Óscar Fuentes wrote: > >> The branch-local-revision is the localized version of the revision >> number, i.e., 1 = 11-10, 2 = 12-10, ... >> >> So, doing that bit of arithmetic is all it takes to decode "revision 11". > > Yes, that works as long as those commits are merged in the same > operation. I think it always works independent of how you merge. The local revision 11 will always be 10.x.1 and local revision 12 will always be 10.x.2. Whether you merge in one steps or multiple steps doesn't make a difference. > But even on that case we would be better without the arithmetic. Think a > feature branch with dozens or hundreds of commits. And I'm not talking > just about commit messages. References on bug reports or e-mail > exchanges suffer from the same. In that case, you are talking about a tradeoff, what will be easier to the committer versus what will be easier for somebody to analyze things later on. My feeling is that committing is done much more often and doing additional chores in the middle of committing is distracting. So I would want to make it easier for committing. If one states the branch nickname and the original revision id on the branch, then it can always be found on the trunk after merging. You can find the branch nickname in the log and then do the little bit of arithmetic to find the right revision. When bug reports are submitted for a branch, the Emacs reporter should be including the branch nickname as part of the version information (if it isn't doing so already). That would ensure that the context is included. > My branch log doesn't show the revnos of trunk as they are on trunk, but > some renumbered version. As you mention, I can start counting merged > revisions across merge points until reaching the referenced revision, > but that's impractical. Every revision is marked by the branch nick(name) and a revision number. If the branch nick is stated as "trunk" for a top-level revision then it is the revision number on the trunk. Otherwise, it is your local revision which would again be identified by your branch nick. There is no counting involved. A maximum of one addition or subtraction. And, it should also be easy enough to write an Emacs command or two to automate it. Cheers, Uday