monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: user-friendly hash formats, redux


From: Bruce Stephens
Subject: [Monotone-devel] Re: user-friendly hash formats, redux
Date: Thu, 09 Dec 2004 22:55:24 +0000
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

graydon hoare <address@hidden> writes:

[...]

> I'm interested in experimenting with naming schemes which lend more
> meaning and familiarity to monotone, and look "more boring"
> (i.e. like CVS or SVN). I'd like to focus the discussion on that if
> possible.
>
> I'll grant that I might just be projecting my own "crazy programmer
> beliefs" onto the general population (of programmers -- monotone's
> target audience). if you can do a survey which demonstrates that I'm
> wrong on this, go for it. but until then, I'm not going to spend any
> effort on implementing/maintaining/fixing a word/phoneme system.

Here's a shellscript/awk hack that maps from a hash to a selector.
(This only works on revisions, so something else would be needed for
manifests and files.):

        % hash2selector 803dab12e227ddee67253a364175b04a664221dc
        net.venge.monotone/njs/2004-12-09T10:25:01

That's no shorter (actually it's longer), but it's less hairy than the
hash, I think.  (Obviously something built in would do error checking,
and include tags if there were any, etc.)  It suggests to me that
selector-based things might be friendly enough.

#!/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]