> From: Emile Snyder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 20, 2001 3:37 PM

> Any glaring
> problems anyone sees?

I don't know if you'd call it a "glaring problem." There are a couple of
problems that can arise because of the way you are attempting to build the
directory name.
a) You will never match a directory name which has multiple consecutive
spaces, like "a   b", or a name which has leading or trailing spaces, like "
a ".
b) You can match the wrong directory if the beginning of a name is the name
of another directory. This would happen if you have "projects" and "projects
a and b".

These may not be likely to happen, but I think they're avoidable with the
method I suggested.
If you're happy with your solution, that's what's important.
If you do decide to do it in some way similar to what I suggested, you can
avoid any problem with commas in directory names by parsing it this way:

undef $special;
if ($filelist =~ s/^(.*)\s\-\s(New director.*|Imported sources)/$2/) {
    $repodir = $1;
    $special = $filelist;
} else {
    $filelist =~
s/^(.*)(\s(([0-9]+\.[0-9\.]*|NONE)\,.*,([0-9]+\.[0-9\.]*|NONE))+)$/$2/;
    $repodir = $1;
}

Cheers,
Jerry

_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to