Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-10-22 06:05:03

Bjørn Roald wrote:
>> I looked at the svn library sources a bit. I concluded that this is
>> relatively simple text parsing. There is one important point to
>> note.
>> The format of the entries file has changes from XML to a simpler text
>> format. Older clients may still use the old format and that will not
>> work. New clients will convert the files automatically as they are
>> used
>> the first time. Hence I decided to ignore the XML format.
>> I wrote a function that I added to scan_cvs_path.cpp, see attachment.
>> It fill the m_cvs_path map with data as it is done in the original
>> cvs
>> version. The only tricky part was getting to the mime info, which
>> are
>> in separate property files, to determine if files are text or binary.
>> Also you have to determine whether various mime types map to binary
>> or
>> text mode.
>> In my function, if a file does not have mime property, it is assumed
>> to
>> be text. If it has mime property starting with anything other than
>> "text/" then it is assumed to be binary. I tested in my version of
>> bcp
>> and it seems to work fine. I added an additional --svn flagg for the
>> command line and the other obvious control logic changes. Maybe
>> people
>> are using bcp automatically for various boost releases, in that case
>> we
>> could make --cvs and --svn aliases, and automatically check for
>> entries
>> files in CVS or .svn directories respectively to check which mode to
>> set.
>> I can provide a patch, but my code is kind of tangled with my other
>> changes for the replace namespace stuff, so did not post that now.
>> If
>> you want me post a patch with or without the namespace stuff, please
>> tell me.
>> Note. I struggled with multi line regexp for tokenizer matching,
>> urrr..
>> I gave up and did it old fashion plain and simple. I think my logic
>> may
>> be cleaned up and made simpler with less nested if statements by
>> using
>> more clever regexp. However, as it is now, it works. :-)

Yup, I've applied your SVN code to SVN HEAD: I made a minor change to the
properties regex as some entries had a blank space at the start of the line:
not sure if this is a bug in our property settings or what, but they seem to
work OK on the server, so I'm assuming we should allow for this :-)

Many thanks, John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at