monotone-devel
[Top][All Lists]
Advanced

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

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


From: Chad Walstrom
Subject: Re: [Monotone-devel] Proposal for human readable revision IDs
Date: Thu, 8 Sep 2005 01:11:31 -0500
User-agent: Mutt/1.5.9i

On Wed, Sep 07, 2005 at 11:02:40AM -0400, Hendrik Boom wrote:
> Or the entire set of Unicode printable characters!  This might be
> *very* good as a display representation, each ID would look *very*
> distinctive.

And force users to make certain their console or SSH applications were
UTF-8 compatible, not to mention localized input devices like
keyboards.  You can't always use a mouse to select-copy-paste.
Practically speaking, I think the suggestion to add spacing every 5
(common w/the crypto crowd) or 4/8 characters (more "natural" for
representing hex) seems most reasonable and global.  I personally like
4 characters/space pattern.  Using a small group of characters creates
a mnemonic device (memory aid) through rhythm, making it easier to
recall.

It would be extremely useful to output "selector hints".  Selectors
are probably one of the more under-used features of monotone.  Using
selectors in the actual output of commands might promote their use,
making them immediately available for copy-n-paste or scripting
operations.  I propose to combine an INI-style output using selectors
(when possible).

    % monotone status PATH
    [Proposed Manifest]
    m:0687 5a5d 40a9 6f6b c5bf 6af9 4456 573e 00a6 9c6a
    
    [Last Revision]
    r:9bed b716 44a5 6862 640e 036e fc32 1fdf 7318 52be
    m:0687 5a5d 40a9 6f6b c5bf 6af9 4456 573e 00a6 9c6a

The []-delimited context could be localized to give better meaning for
each language whereas selectors are unmodified.

The status command might be able to give more information about the
current PATH as well.  We don't want to use the "r:" selector to
indicate the file's SHA1, since it they mean entirely different
things.  Although the INI-style context should deliver meaning, it
would still be confusing.

    [PATH]
    Identifier: 5a5d 0687 6f6b 40a9 6af9 c5bf 4456 00a6 573e 9c6a
    Meta: meta information

"monotone log" could also be altered to output selectors:

    % monotone log PATH
    -----------------------------------------------------------------
    [Ancestor]
    r:

    [Current]
    r:9bed b716 44a5 6862 640e 036e fc32 1fdf 7318 52be
    a:address@hidden
    d:2005-09-01T05:44:38
    b:branch.name
    t:tag1
    t:tag2

    [Added files]
    FILE1 FILE2 FILE3

    [ChangeLog]
    Example changelog entry.
    -----------------------------------------------------------------

I'm not real fond of the "old_revision [SHA1]" output, since it can't
immediately be used as a selector (via copy-and-paste operations).
INI-style output is and old-reliable with support across most
programming/scripting languages, and it's readable to boot.  I took
some artistic-license with the free form of "Added Files" and
"ChangeLog" sections rather than following the strict "key: value"
pairs format for all entries below the []-delimited sections.  We can
call it a "modified INI" output. ;-)

I realize that there is some ambiguity in the above suggestions (and
probable misuse of terminology), but use them as a springboard for
discussion rather than hard-fast rules.

-- 
Chad Walstrom <address@hidden>           http://www.wookimus.net/
           assert(expired(knowledge)); /* core dump */





reply via email to

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