[cvsnt] Re: Urgent! Taginfo Scripts

Bo Berglund Bo.Berglund at system3r.se
Tue Jun 15 09:43:11 BST 2004


Of course every other $item is a file and every other is a revision.
You also have to handle the embedded space escapes here. CVSNT accepts
file names with embedded spaces in the names whereas UNIX does not.
On the taginfo output this is handled by setting a \ in front of each
space in the file name, but the space remains. So if PERL parses the
items on STDIN by looking for the spaces then you will get a problem here.

Myself, I retrieve the whole STDIN as a single string, then I parse it
out myself by scanning from the start and if I find a space that is preceded
by a \ then I remove the following space. After this I cut the string into
items by replacing space with returns and then I replace the \ with space.
Now there is an items list that contains name-revision pairs and the names
are the proper Windows file names including any embedded space.

But I do this in Delphi, not in PERL...

/Bo


-----Original Message-----
From: cvsnt-bounces at cvsnt.org [mailto:cvsnt-bounces at cvsnt.org]On Behalf
Of Pat Galea
Sent: den 15 juni 2004 09:57
To: cvsnt at cvsnt.org
Subject: Re: [cvsnt] Re: Urgent! Taginfo Scripts


Josh Skains wrote:
> Hmmmm.. So now I gotta figure out how to catch the data in Perl :(..... I certainly didn't realize the depth of differences between CVS and CVSNT..... Back to the drawing board!

It's dead easy. You just need something like:

   @files = <STDIN>;

   foreach $item (@files)
   {
     # Do stuff
   }

Regards
Pat Galea
_______________________________________________
cvsnt mailing list
cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt



More information about the cvsnt mailing list