monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Suggestion: Use wildcards for specifying collection


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Suggestion: Use wildcards for specifying collections
Date: Thu, 14 Apr 2005 22:10:26 -0700
User-agent: Mutt/1.5.8i

On Sun, Apr 10, 2005 at 11:28:27PM +0200, Florian Weimer wrote:
> At the moment, collections are matched against a specified prefix (for
> example, during push or pull).  This means, for example, that you
> cannot pull the net.venge.monotone branch without also pulling the
> net.venge.monotone-viz branch.
> 
> I think it would make sense to take the wildmat function from tar, and
> use it in the places where string::find(const string&) at the moment
> to check for a matching prefix.  Comments?

We actually have a somewhat more ambitious todo item than this already
:-).  The goal is to get rid of collections entirely -- they turn out
to be inflexible and confusing -- and instead let clients specify in
an ad hoc way when they connect some pattern of branches that they
want to synchronize.  Then the server builds the merkle structures for
the given branch set on the fly, and away they go.

I have some preference for using regex's for the pattern matching,
instead of globs, because it seems like people will want to be able to
express disjunction -- "I want exactly branch A, and branch B" -- and
to support that use case with globs you have to allow a _list_ of
patterns to match against, while regex's can express such things with
just a single pattern.  Also, we already have a handy regex library
linked in, that we use for other things :-)  (boost::regex)

As in incremental improvement, it might be interesting to keep the
current collection code while switching to pattern-matched branch
specifications for collections, but it seems a little user-hostile to
tell people that they must type exactly "pull venge.net
net\.venge\.monotone($|.+)" or else their collection won't match
anything in the server's list of offered collections...

-- Nathaniel

-- 
When the flush of a new-born sun fell first on Eden's green and gold,
Our father Adam sat under the Tree and scratched with a stick in the mould;
And the first rude sketch that the world had seen was joy to his mighty heart,
Till the Devil whispered behind the leaves, "It's pretty, but is it Art?"
  -- The Conundrum of the Workshops, Rudyard Kipling




reply via email to

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