[Top][All Lists]

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

Re: [Gnu-arch-users] abrowse and rbrowse

From: Miles Bader
Subject: Re: [Gnu-arch-users] abrowse and rbrowse
Date: Tue, 11 May 2004 17:38:22 -0400
User-agent: Mutt/1.3.28i

On Tue, May 11, 2004 at 12:14:31PM -0400, James Blackwell wrote:
> The main differences between abrowse and rbrowse is that abrowse offers
> limiting via a LIMIT interface, and rbrowse limits by using a regular
> expression interface. 

Hmmm, sorry.  Perhaps I interpreted the help message, which says:

   usage: tla rbrowse [options] [LIMIT REGEX]

That makes look like it accepts two optional arguments, a LIMIT and a REGEX.
I take it you're saying it's actually `[LIMIT_REGEX]'?

> > abrowse can be much faster if you're listing a slow remote archive, and
> > specify a particular category/branch.  The reason is that abrowse only
> > accesses the category/branch you specify, but rbrowse -- to best of my
> > knowledge (based on observation, not reading the code) -- fetches
> > everything and then only prints what matches.
> Though there was a problem, it was fixed months ago. Both commands
> actually run in the same time. These days, if you time both abrowse and
> rbrowse from start to finish, you should end up with the same timing.

Hmmm, I did a few informal tests when I sent that message, and the rbrowse
seemed much slower (with my very slow dialup connection).  So does this
means there's a bug somewhere?

> > rbrowse could be optimized to use abrowse-style behavior when a limit is
> > specified, and then should be as fast as abrowse in that case, but it
> > hasn't been done yet.
> Pardon? Why would you want to replace regexes with limits? The point to
> rbrowse is to replace limits with regexes.

Sorry, the description of rbrowse having a `LIMIT' arg was based on my
misreading of the help (see above).

However (with the current implementation at least) the use of regexps can
lead to some inconvenient behavior compared with limits.  E.g.:

 (1) They currently don't seem to be anchored in any way, so doing `rbrowse
     foo' will actually list categories `foo', `foo-bar', branche names
     matching `foo', etc.  Since I think its a very common to want to simply
     list the contents of a particular category, and it's also common to have
     several categories with the similar names (foo, foo-tests, etc), this
     can be annoying.

 (2) abrowse will automatically use the given LIMIT to select the correct
     archive, but with rbrowse you have to use the -A option to make it
     search something other than your default archive.

     E.g., my default archive is address@hidden'.  If I want to
     browse in address@hidden/tla-tools', I can do:

        tla abrowse address@hidden/tla-tools

     but an equivalent rbrowse command yields no output, which is pretty

     This could _probably_ be fixed by some judicious pre-archive-scan
     handling of the regexp, e.g., if the regexp contains a `/', match
     against the archive-list first, but the free-form nature of regexps make
     this hard to do in an entirely clean manner.

I think the nicest solution to problems like the above would be to use
regexps that had domain-specific alterations, e.g., `.' would only match
inside components, and would not span `/', `--', etc., and make matches
always anchored by default, e.g. `foo' would only match `foo' and you'd have
to use `foo.*' to match `foo-bar'.

> > [BTW, I notice that abrowse and rbrowse use different amounts of
> >  indentation; perhaps this should be made consistent, in case somebody's
> >  tools are keying off indentation level?]
> Rbrowse's indentation looks the same to me as the rest of tla.

rbrowse uses 3 spaces per level of indent, abrowse uses 2.


"1971 pickup truck; will trade for guns"

reply via email to

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