On 25 Jul 2002 issues@subversion.tigris.org wrote:
> http://subversion.tigris.org/issues/show_bug.cgi?id=816
>
>
>
>
>
> ------- Additional Comments From kfogel@tigris.org 2002-07-25 12:45 PDT -------
> Should not do silent success. If the user explicitly requests a
> non-existent revision, there ought to be _some_ signal that they have
> done so :-).
>
> Maybe print the logs for the existent revisions, then insert a special
> error log msg or something, dunno. Lots of ways to do it, just please
> not silently...
>
The following patch is a partial fix: it addresses the case where one of
revision number is greater than the current head.
Unfortunately, I don't know enough to write the error log bit yet, so
you may want to reject this and let someone who knows what they're
doing tackle it.
Incidentally, it might be worth pointing out in the usage messages that
"head" is a valid revision number.
Regards
Kieran
--- log.c Fri Jul 26 02:00:22 2002
+++ log.c Fri Jul 26 02:32:10 2002
@@ -43,7 +43,7 @@
/*** Public Interface. ***/
-
+
svn_error_t *
svn_client_log (svn_client_auth_baton_t *auth_baton,
@@ -62,9 +62,11 @@
const char *URL;
const char *base_name = NULL;
apr_array_header_t *condensed_targets;
- svn_revnum_t start_revnum, end_revnum;
+ svn_revnum_t start_revnum, end_revnum, head_revnum;
svn_error_t *err;
+ svn_client_revision_t head;
+ head.kind = svn_client_revision_head;
if ((start->kind == svn_client_revision_unspecified)
|| (end->kind == svn_client_revision_unspecified))
{
@@ -73,7 +75,7 @@
"svn_client_log: caller failed to supply revision");
}
- start_revnum = end_revnum = SVN_INVALID_REVNUM;
+ start_revnum = end_revnum = head_revnum = SVN_INVALID_REVNUM;
path = (APR_ARRAY_IDX(targets, 0, const char *));
@@ -151,7 +153,24 @@
(&start_revnum, ra_lib, session, start, base_name, pool));
SVN_ERR (svn_client__get_revision_number
(&end_revnum, ra_lib, session, end, base_name, pool));
+ SVN_ERR (svn_client__get_revision_number
+ (&head_revnum, ra_lib, session, &head, base_name, pool));
+ /* To deal with the case where one of the revision numbers provided
+ is greater than the current head, we calculate the head revision
+ number in the line above, and use that value instead of the
+ problem value.
+ FIXME: need to give error message to user, preferably at the end
+ of the log data. */
+ if (start_revnum > head_revnum && end_revnum < head_revnum)
+ {
+ start_revnum = head_revnum;
+ }
+ if (start_revnum < head_revnum && end_revnum > head_revnum)
+ {
+ end_revnum = head_revnum;
+ }
+
err = ra_lib->get_log (session,
condensed_targets,
start_revnum,
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 26 03:42:36 2002