[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Question about svn log -D

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-09-10 16:40:03 CEST

"Bieber, Ron" <bieber.r@ic.grainger.com> writes:
> One of the prerequisites of converting our source repository to subversion
> upon the 1.0 release will be that it runs with the CruiseControl automated
> build application. I figured that this CC functionality (along with any
> related ant tasks) might be a way that I could contribute to the project.
>
> One of the things that cruisecontrol does is a CVS log by date (-d >
> 2002-08-09). It seems as if subversion doesn't support this functionality
> yet (and at all in mod_dav_svn).

I'm glad you asked; this one appears to have fallen through the
cracks.

The date functionality is actually working for ra_local (the short
option is "-D", long opt is "--date"). But it doesn't work over
ra_dav yet; the function svn_ra_dav__get_dated_revision() simply needs
to be filled in, and mod_dav_svn tweaked to handle the request,
probably.

However, there is another outstanding issue with dates, see this
comment from subversion/clients/cmdline/main.c:parse_date():

      /* ### todo: some standard date formats contain colons.
         Eventually, we should probably allow those, and use some
         other syntax for expressing ranges. But for now, I'm just
         going to bail if see a non-separator colon, to get this up
         and running. -kff */

The reason we're using ":" as the separator, even though many date
formats use colons internally, is to match the way the revision (-r)
option works, as in

   $ svn log -r953:961

Here are some possible solutions to this problem:

   * Allow the repeated option model, as CVS does with -r. So both
     'svn log -r X -r Y' and 'svn log -D X -D Y' would work, and -r
     would continue to support the colon syntax as well. I kind of
     like this, because it makes it easy to *mix* revision and date
     options, as in 'svn log -D X -r Y'.

   * Use a different separator for date ranges. But which one? And
     it would be annoying if dates worked differently than revisions,
     so if we came up with a different separator, we should probably
     use it (or at least allow it) for -r as well. I don't like this
     as much as the first solution.

   * Some other idea?

Thoughts?

> Are there plans to do this before the 1.0 release? If so, is the '>'
> operator going to be supported in the -D option?

Oh, it will be supported, yes.

I don't think we want to emulate CVS's '>' operator, though. The same
functionality can be achieved by using the special revisions 1 and
"HEAD", which avoids the inconvenience of quoting '>' for the shell.

> PS. BTW, it was a brilliant decision to provide an option to dump the log
> in XML. This will simplify cruisecontrol's module for log parsing
> immensely since we can use an XML transform to convert the log to the
> cruisecontrol modificationset XML.

Cool! Thank Nuutti Kotivuori for that patch :-).

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 10 17:02:07 2002

This is an archived mail posted to the Subversion Dev mailing list.