[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Status of global and tree aliases
From: |
Phil Frost |
Subject: |
Re: [Gnu-arch-users] Status of global and tree aliases |
Date: |
Tue, 20 Jul 2004 16:12:48 -0400 |
User-agent: |
Mutt/1.5.6+20040523i |
Personally I find the current state of naming archives categories
branches versions and revisions a total mess, and I think adding a dumb
string substuition capability to it won't make things any better.
What's messy? In some commands, I can say category--branch, and that's
short for the last patch in the latest version. In others, it doesn't
work. There are two possible defaults for archives, the one of the
current tree, and the one set by my-default-archive, and I'm never sure
which tla will use. AFAICT, there is no way to say "patch-3 of what i'm
working on now" in a terse way.
What I'd like to see is more consistent and intelegent parsing of
identifiers:
- get rid of my-default-archive. The archive defaults to the archive of
the project tree in the cwd; if one is not in a project tree, he must
explicitly specify the archive
- reasonable defaults should be taken from the project tree wherever
possible. Split the identifier on "--", and determine if each token is
a category, branch, version, or patchlevel with the following rules:
- if it matches ^(patch|base|version(fix)?-\d+$, it's a patchlevel.
- if it matches ^\d+(\.\d+)*$, it's a version.
- if it's preceded by '/', it's a category.
- otherwise, it's a branch.
branch, category, and archive default to that of the project tree
patchlevels and versions default to the latest available
Thus if i am working on cat--branch--3.4--patch-6, tla can infer:
address@hidden/ -> invalid, ambigious category
/othercat -> invalid, ambigious branch
/othercat--mainline -> othercat--mainline--(latest)--(latest)
mainline -> cat--mainline--(latest)--(latest)
patch--3 -> cat--branch--3.4--patch-3
3.2 -> cat--branch--3.2--(latest)
This alone would save large amounts of typing.
Then, if aliases are implemented, it is tracked how specific they are.
That is, they can specify as little as archive, up to specifying an
exact patchlevel, with archive, category, branch and version included.
I think such a system is feasible, intuitive, consistant, and
efficient. Unlike simple string substuition, it won't produce weird
errors when a mistake is made. And in any case, my shell already
provides string substitution. I routinely do:
.bashrc: uuuarch="address@hidden"
uuumain="$uuuarch/unununium--mainline--0.2"
$ tla replay $uuumain--patch-3
On Tue, Jul 20, 2004 at 12:52:10PM -0400, James Blackwell wrote:
> Normally, I don't announce something before its actually working in a
> usable form, but considering some of the other posts going 'round on the
> mailing list, now is probably the time to talk.
>
> I'm about 25% done with my aliases project for arch. The results of this
> project is that you will be able to substancially reduce the amount of
> typing that you'll have to perform for repetitive (why "repetitive"
> instead of "repeatitive?") tasks.
>
> Here's how the interface to the aliases look:
> ---------------------------------------------
>
> $ tla alias --add --global lordtla address@hidden/tla--devo--1.3
> $ tla get lordtla
> $ tla alias --delete --global lordtla
>
> $ tla alias --add --tree upstream address@hidden/tla--devo--1.3
> $ tla star-merge upstream
> $ tla alias --delete --tree upstream
>
> ...
- Re: [Gnu-arch-users] Status of global and tree aliases, (continued)
- Re: [Gnu-arch-users] Status of global and tree aliases, Tom Lord, 2004/07/20
- Re: [Gnu-arch-users] Status of global and tree aliases, Colin Walters, 2004/07/20
- Re: [Gnu-arch-users] Status of global and tree aliases, Tom Lord, 2004/07/20
- Re: [Gnu-arch-users] Status of global and tree aliases, James Blackwell, 2004/07/21
- Re: [Gnu-arch-users] Status of global and tree aliases, Stephen J. Turnbull, 2004/07/22
- Re: [Gnu-arch-users] Status of global and tree aliases, Tom Lord, 2004/07/22
- Re: [Gnu-arch-users] Status of global and tree aliases, Andrew Suffield, 2004/07/22
- Re: [Gnu-arch-users] Status of global and tree aliases, Stephen J. Turnbull, 2004/07/23
- Re: [Gnu-arch-users] Status of global and tree aliases, Colin Walters, 2004/07/20
- Re: [Gnu-arch-users] Status of global and tree aliases, Tom Lord, 2004/07/20
Re: [Gnu-arch-users] Status of global and tree aliases,
Phil Frost <=