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

Re: possible bug in svnadmin

From: Joseph Dunn <Joseph.Dunn_at_Colorado.EDU>
Date: 2004-03-22 21:41:10 CET

My bored co-worker came up with a small patch to make svnadmin
dump recognize dates. We only tested it minimally, but it seems pretty
straight forward. I've just inlined it between the hash marks.
-Joe

##################################################
diff -Naur subversion-1.0.1/subversion/svnadmin/main.c subversion-1.0.1.mod/subversion/svnadmin/main.c
--- subversion-1.0.1/subversion/svnadmin/main.c 2004-03-22 11:51:50.000000000 -0700
+++ subversion-1.0.1.mod/subversion/svnadmin/main.c 2004-03-22 11:16:47.000000000 -0700
@@ -451,6 +451,9 @@
     lower = opt_state->start_revision.value.number;
   else if (opt_state->start_revision.kind == svn_opt_revision_head)
     lower = youngest;
+ else if (opt_state->start_revision.kind == svn_opt_revision_date)
+ SVN_ERR (svn_repos_dated_revision(&lower, repos,
+ opt_state->start_revision.value.date, pool));
   else
     lower = SVN_INVALID_REVNUM;

@@ -458,6 +461,9 @@
     upper = opt_state->end_revision.value.number;
   else if (opt_state->end_revision.kind == svn_opt_revision_head)
     upper = youngest;
+ else if (opt_state->end_revision.kind == svn_opt_revision_date)
+ SVN_ERR (svn_repos_dated_revision(&upper, repos,
+ opt_state->end_revision.value.date, pool));
   else
     upper = SVN_INVALID_REVNUM;

#################################################
On Mon, 22 Mar 2004, Julian Foad wrote:

> Joseph Dunn wrote:
> > I was writing a script to dump a repository on a regular basis. I wanted to use dates in the svnadmin dump command, but they don't work. This was brought up on the #svn irc channel and I was told to send en email to the dev list. To duplicate the problem simply take any svn respository and try to dump all revisions from a certain date forward. According to the documentation anywhere that a revision number can be used a date in {} can be used. However, although svnadmin dump checks the syntax of the date, but then dumps all revisions. If anyone would like an example repository, I have a sample one, but I don't see what it can tell you that I can't. Well, I'll use an svn log command to translate the dates into versions, but it'd be nice to be able to skip that step. Let me know if you need any other information.
>
> Thanks for reporting this. I can see in the code that the function 'subcommand_dump' does not currently handle the '{DATE}' method of specifying a revision. Unfortunately it does not throw an error, and just ignores the revision specification. It should throw an error for any revision specification that it cannot handle: not just dates, but also 'COMMITTED' etc.
>
> - Julian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 22 21:41:29 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.