You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2008/10/14 21:28:43 UTC
[PATCH] Correctly handle SVN_INVALID_REVNUM in svn_repos_get_logs4 even for start < head
I'd run tests and commit, but apparently we now require a newer
sqlite3 than my work machine has installed, and while I recognize that
sqlite3 is really really easy to build, it's still more activation
energy than I have today. Sorry.
[[[
* subversion/libsvn_repos/log.c
(svn_repos_get_logs4): For the ascending-revisions case, handle
SVN_INVALID_REVNUM
arguments correctly.
]]]
Index: subversion/libsvn_repos/log.c
===================================================================
--- subversion/libsvn_repos/log.c (revision 33643)
+++ subversion/libsvn_repos/log.c (working copy)
@@ -1612,10 +1612,10 @@
SVN_ERR(svn_fs_youngest_rev(&head, fs, pool));
if (! SVN_IS_VALID_REVNUM(start))
- start = head;
+ hist_start = start = head;
if (! SVN_IS_VALID_REVNUM(end))
- end = head;
+ hist_end = end = head;
/* Check that revisions are sane before ever invoking receiver. */
if (start > head)
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Correctly handle SVN_INVALID_REVNUM in svn_repos_get_logs4
even for start < head
Posted by "C. Michael Pilato" <cm...@collab.net>.
David Glasser wrote:
> I'd run tests and commit, but apparently we now require a newer
> sqlite3 than my work machine has installed, and while I recognize that
> sqlite3 is really really easy to build, it's still more activation
> energy than I have today. Sorry.
>
> [[[
> * subversion/libsvn_repos/log.c
> (svn_repos_get_logs4): For the ascending-revisions case, handle
> SVN_INVALID_REVNUM
> arguments correctly.
> ]]]
>
> Index: subversion/libsvn_repos/log.c
> ===================================================================
> --- subversion/libsvn_repos/log.c (revision 33643)
> +++ subversion/libsvn_repos/log.c (working copy)
> @@ -1612,10 +1612,10 @@
> SVN_ERR(svn_fs_youngest_rev(&head, fs, pool));
>
> if (! SVN_IS_VALID_REVNUM(start))
> - start = head;
> + hist_start = start = head;
>
> if (! SVN_IS_VALID_REVNUM(end))
> - end = head;
> + hist_end = end = head;
>
> /* Check that revisions are sane before ever invoking receiver. */
> if (start > head)
Maybe we should just lose the quite-unnecessary hist_* variables? See
attached patch (tested just as well as yours).
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: [PATCH] Correctly handle SVN_INVALID_REVNUM in svn_repos_get_logs4 even for start < head
Posted by David Glasser <gl...@davidglasser.net>.
start = 0, end = SVN_INVALID_REVNUM?
--dave
On Tue, Oct 14, 2008 at 2:38 PM, Hyrum K. Wright
<hy...@mail.utexas.edu> wrote:
> David Glasser wrote:
>> I'd run tests and commit, but apparently we now require a newer
>> sqlite3 than my work machine has installed, and while I recognize that
>> sqlite3 is really really easy to build, it's still more activation
>> energy than I have today. Sorry.
>>
>> [[[
>> * subversion/libsvn_repos/log.c
>> (svn_repos_get_logs4): For the ascending-revisions case, handle
>> SVN_INVALID_REVNUM
>> arguments correctly.
>> ]]]
>>
>> Index: subversion/libsvn_repos/log.c
>> ===================================================================
>> --- subversion/libsvn_repos/log.c (revision 33643)
>> +++ subversion/libsvn_repos/log.c (working copy)
>> @@ -1612,10 +1612,10 @@
>> SVN_ERR(svn_fs_youngest_rev(&head, fs, pool));
>>
>> if (! SVN_IS_VALID_REVNUM(start))
>> - start = head;
>> + hist_start = start = head;
>>
>> if (! SVN_IS_VALID_REVNUM(end))
>> - end = head;
>> + hist_end = end = head;
>>
>> /* Check that revisions are sane before ever invoking receiver. */
>> if (start > head)
>
> Out of curiosity, do you have an example which demonstrates this problem?
>
> -Hyrum
>
>
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Correctly handle SVN_INVALID_REVNUM in svn_repos_get_logs4
even for start < head
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
David Glasser wrote:
> I'd run tests and commit, but apparently we now require a newer
> sqlite3 than my work machine has installed, and while I recognize that
> sqlite3 is really really easy to build, it's still more activation
> energy than I have today. Sorry.
>
> [[[
> * subversion/libsvn_repos/log.c
> (svn_repos_get_logs4): For the ascending-revisions case, handle
> SVN_INVALID_REVNUM
> arguments correctly.
> ]]]
>
> Index: subversion/libsvn_repos/log.c
> ===================================================================
> --- subversion/libsvn_repos/log.c (revision 33643)
> +++ subversion/libsvn_repos/log.c (working copy)
> @@ -1612,10 +1612,10 @@
> SVN_ERR(svn_fs_youngest_rev(&head, fs, pool));
>
> if (! SVN_IS_VALID_REVNUM(start))
> - start = head;
> + hist_start = start = head;
>
> if (! SVN_IS_VALID_REVNUM(end))
> - end = head;
> + hist_end = end = head;
>
> /* Check that revisions are sane before ever invoking receiver. */
> if (start > head)
Out of curiosity, do you have an example which demonstrates this problem?
-Hyrum