subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <>
Subject Re: svn commit: r1815799 - in /subversion/trunk/subversion: libsvn_ra_serf/commit.c tests/libsvn_ra/ra-test.c
Date Tue, 21 Nov 2017 22:56:09 GMT
Evgeny Kotkov wrote:
> I think that I have missed that open_root() must open a directory and so
> it cannot be used when working with a file URL.  This, in turn, means
> that the test example is indeed an undocumented/invalid usage of the
> delta editor API and that it works by a coincidence.
> I can propose doing the following:
> (1) Keep the new simpler check in maybe_set_lock_token_header() — as,
>      unless I missing something, there should be no reason to explicitly
>      filter empty relpaths for the lock tokens since they are invalid.

I agree it is good to remove the '*relpath &&' condition if there is no 
reason why it needs to be there.

Don't replace it with 'relpath &&' instead, however. If relpath is null 
then I think the next line (svn_hash_gets(..., relpath)) would 
immediately crash anyway, so allowing it here is useless and therefore 
confusing. Remove that condition entirely. That's my suggestion.

- Julian

> (2) I am going to tweak the new test so that it would properly open the
>      parent directory and commit to a locked file, to have this case
>      covered with a native test.

View raw message