monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: Proposal for human readable revision IDs


From: Bruce Stephens
Subject: [Monotone-devel] Re: Proposal for human readable revision IDs
Date: Mon, 12 Sep 2005 20:50:30 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Steven Grimm <address@hidden> writes:

[...]

> Is there any significant performance penalty to having zillions of
> tags in the system?

I don't know.  I'd guess not.

> I think most people's objections to the hashcodes would be be
> satisfied with a hook script that auto-tags revisions with a much
> shorter, likely-but-not-guaranteed unique, value at commit time
> (username + timestamp, DB name + autoincremented serial number,
> etc.)

What's "DB name"?  How about using username + timestamp, branch name,
and a few digits of the hash?  All of that is (conveniently) part of
the selector syntax, so for input you can do that right away.  I
attach a little script that can produce a selector from a hash
(obviously it can be configured to taste).

> I know if I had that, I'd probably never refer to a hex revision
> ID. What happens when there's a name collision between tags during a
> synchronize, anyway?

IIRC, you get the same tag on two (or more) revisions.  Tags don't
(necessarily) mark a unique revision.

#!/bin/sh

monotone list certs $1 |
awk '/^Name  : .*$/ {sub(/^Name  : /, ""); kind=$0}
     /^Value : .*$/ {sub(/^Value : /, ""); cert[kind]=$0}
     END {sub(/@.*$/,"",cert["author"]);
     printf("%s/%s/%s\n", cert["branch"], cert["author"], cert["date"])}'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]