From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
To: emacs-devel@gnu.org
Subject: Re: Please don't use revision numbers on commit messages (and elsewhere).
Date: Sat, 02 Apr 2011 07:20:49 +0100 [thread overview]
Message-ID: <in6f8g$ubo$1@dough.gmane.org> (raw)
In-Reply-To: <87aag9tt7e.fsf@wanadoo.es>
On 4/2/2011 1:03 AM, Óscar Fuentes wrote:
>>
>> Can you comment on whether this convention suits you?
>
> I don't get the part about the local branch. If you branch from trunk
> when the tip revno is 10, then commit locally (revno 11) then commit
> again locally (revno 12) mentioning your revno 11 on the commit message,
> finally merge the changes into trunk which meanwhile advanced to revno
> 15, this is how trunk looks like afterwards:
>
No, the trunk really looks like this:
16 merge uday's awesome feature into trunk
10.1.2 Fix bug introduced on revision 11
10.1.1 Implement awesome feature
15 someone else's changes
14 someone else's changes
13 someone else's changes
12 someone else's changes
11 someone else's changes
10 someone else's changes
....
Notice that the merged branch revisions are numbered 10.x.y, not 16.x.y
or 15.x.y. If the branch originated at revno 10 of the trunk, then its
revisions are numbered 10.1.1, 10.1.2,.... That is how the DAG structure
is represented. (I didn't realize this until Stephen Turnbull explained
it to me last summer, here on emacs-dev!)
The three components of the revision number are:
base-revision . branch-id . branch-local-revision
The base-revision is revision number where the branch diverged from the
trunk.
The branch-id is a unique number for the merged branch, just in case
multiple branches based at revision 10 happen to get merged in due course.
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".
> 1. People do as they see. If you put revnos on trunk's commit messages
> they get the message that it is okay to do that on their branches
> too.
Agreed. But as I have argued, it is okay for people to do it in their
branches too.
> 2. Related to the previous, it is undesirable to add exceptions to
> policies.
The same response as above.
> 3. If you are inspecting the VC history on a branch and wish to see
> where certain commit with revno X mentioned on a commit message, bug
> report, etc fits on the context of your branch, you must go out of
> your way to look up on trunk the revid of X.
All you would need is your branch's history. I don't understand what
you would find on the trunk that you don't have in your branch's log
already.
> 4. Generalizing the previous point: revids remain valid after a merge,
> revnos don't.
revid's remain textually valid. revno's remain mathematically valid.
If it turns out to be a big problem, then we should probably write an
emacs browser for bzr logs that does the conversions.
Ideally, bzr people should have given us some way to write something
like $r12 in the log entry, which could have been automatically
translated to 10.1.1. But you know bzr people. They don't like to make
life harder for the novices to help the experts.
-------
Another possible way to write the revision references is to use relative
numbers, i.e., to refer to revision 11 in revision 12, just say
"revision -1". It is easy to write, and easy to understand as well.
Cheers,
Uday
next prev parent reply other threads:[~2011-04-02 6:20 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 20:47 Please don't use revision numbers on commit messages (and elsewhere) Óscar Fuentes
2011-03-31 21:36 ` Lennart Borgman
2011-03-31 21:53 ` Óscar Fuentes
2011-03-31 21:59 ` Lennart Borgman
2011-03-31 22:06 ` Óscar Fuentes
2011-03-31 22:18 ` Lennart Borgman
2011-03-31 22:58 ` Juanma Barranquero
2011-04-01 7:42 ` Eli Zaretskii
2011-04-01 7:58 ` Andreas Schwab
2011-04-01 8:02 ` Eli Zaretskii
2011-04-01 8:17 ` Andreas Schwab
2011-04-01 8:42 ` Eli Zaretskii
2011-04-01 8:54 ` Andreas Schwab
2011-04-01 10:11 ` Eli Zaretskii
2011-04-01 10:21 ` Andreas Schwab
2011-04-01 10:48 ` Eli Zaretskii
2011-04-01 11:18 ` Andreas Schwab
2011-04-01 13:15 ` Eli Zaretskii
2011-04-01 13:32 ` Andreas Schwab
2011-04-01 13:47 ` Eli Zaretskii
2011-04-01 13:51 ` Deniz Dogan
2011-04-01 15:26 ` Óscar Fuentes
2011-04-01 19:13 ` Eli Zaretskii
2011-04-01 20:17 ` Óscar Fuentes
2011-03-31 23:14 ` Juanma Barranquero
2011-04-01 0:11 ` Óscar Fuentes
2011-04-01 0:28 ` Juanma Barranquero
2011-04-01 1:20 ` Óscar Fuentes
2011-04-01 8:18 ` Eli Zaretskii
2011-04-01 12:08 ` David Kastrup
2011-04-01 13:15 ` Eli Zaretskii
2011-04-01 15:35 ` Óscar Fuentes
2011-04-01 19:52 ` Eli Zaretskii
2011-04-01 20:04 ` David Kastrup
2011-04-01 20:36 ` Eli Zaretskii
2011-04-01 20:43 ` Óscar Fuentes
2011-04-01 10:34 ` Juanma Barranquero
2011-04-01 15:55 ` Óscar Fuentes
2011-04-01 21:53 ` Juanma Barranquero
2011-04-04 16:32 ` Nils Ackermann
2011-04-04 21:27 ` Juanma Barranquero
2011-04-04 21:36 ` Lennart Borgman
2011-04-04 21:49 ` Juanma Barranquero
2011-04-04 22:03 ` Lennart Borgman
2011-04-04 22:09 ` Juanma Barranquero
2011-04-04 22:27 ` Stefan Monnier
2011-04-04 22:35 ` Juanma Barranquero
2011-04-05 21:00 ` Thien-Thi Nguyen
2011-04-05 21:00 ` Thien-Thi Nguyen
2011-04-06 1:30 ` Stefan Monnier
2011-04-06 2:55 ` Stephen J. Turnbull
2011-04-06 12:47 ` Thien-Thi Nguyen
2011-04-01 1:59 ` Stephen J. Turnbull
2011-04-01 10:00 ` Uday S Reddy
2011-04-01 15:00 ` Stephen J. Turnbull
2011-04-01 16:38 ` Uday S Reddy
2011-04-01 18:08 ` Stephen J. Turnbull
2011-04-01 18:56 ` Uday S Reddy
2011-04-01 20:49 ` Stephen J. Turnbull
2011-04-01 10:45 ` Juanma Barranquero
2011-04-01 14:51 ` Stefan Monnier
2011-04-01 15:14 ` Ted Zlatanov
2011-04-01 19:58 ` Juanma Barranquero
2011-04-02 2:12 ` Chong Yidong
2011-04-01 1:35 ` Stephen J. Turnbull
2011-04-01 10:39 ` Juanma Barranquero
2011-03-31 23:16 ` Thien-Thi Nguyen
2011-04-01 0:20 ` Óscar Fuentes
2011-04-01 8:38 ` Thien-Thi Nguyen
2011-04-01 9:36 ` Eli Zaretskii
2011-04-01 10:14 ` Eli Zaretskii
2011-04-01 17:38 ` Thien-Thi Nguyen
2011-04-01 15:38 ` Óscar Fuentes
2011-04-01 19:12 ` Eli Zaretskii
2011-04-01 20:21 ` Óscar Fuentes
2011-04-01 20:38 ` Eli Zaretskii
2011-04-01 21:40 ` Uday S Reddy
2011-04-02 0:03 ` Óscar Fuentes
2011-04-02 6:20 ` Uday S Reddy [this message]
2011-04-02 13:47 ` Óscar Fuentes
2011-04-03 8:00 ` Uday S Reddy
2011-04-03 16:13 ` Óscar Fuentes
2011-04-04 9:29 ` Uday S Reddy
2011-04-05 2:20 ` Stephen J. Turnbull
2011-04-02 2:57 ` Stephen J. Turnbull
2011-04-01 0:55 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='in6f8g$ubo$1@dough.gmane.org' \
--to=u.s.reddy@cs.bham.ac.uk \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).