John Arbash Meinel <[EMAIL PROTECTED]> writes: > The other thing to consider, is that because the '/' only occurs 1 time > in all fully qualified revision names A.*/bazaar.* does indeed match to > the correct '/' and would work exactly the same way if you were using > grep to do the processing.
That's almost but not exactly true: If you provide archives as URL, it may contain several slashes. The semantics I've used for rbrowse is that the last slash is the delimiter between archive and branch (but regexps are not allowed in locations). baz rbrowse --id-regex '/home/moy/WWW/arch/public/bazaar.*' > Now if you did "A.*bazaar.*" that would be something different, because > you don't have an anchor point for where bazaar must occur. That's forbidden. It would lead to awfully complex implementation, and the semantics could hardly be clear. > I've looked into it a little bit, and I realized that transforming a > glob into a regex is rather trivial. Because you just can't express that > much stuff in glob syntax, so they don't use many features of regex. It's rather trivial to do it "the inefficient way", but a good glob engine would take advantage of the glob regularity and could probably avoid the construction of the DFA. > The other answer is that the function "fnmatch" is the standard POSIX > glob function. int fnmatch(const char* pattern, const char *string, int > flags); Thanks, > I'm curious how it would work in something like the current baz-ng > format, where really it is just the path/url to the directory which > defines the "archive". It might just be that baz-ng is planning to > handle some sort of hierarchical arch-like structure, and has just not > gotten there yet. Not following bazaar-ng closely, but http://bazaar-ng.org/doc/todo-from-arch.html Archive names are probably unnecessary. (I'm not sure I really agree with this. I like being able to name an archive by its name. It's particularly important when you have several mirrors of the same archive, or when you access an archive differently depending on the machine you're using.) -- Matthieu _______________________________________________ Gnu-arch-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/
