/[Apache-SVN]
ViewVC logotype

Revision 1917944


Jump to revision: Previous Next
Author: hartmannathan
Date: Fri May 24 15:59:50 2024 UTC (2 months ago)
Changed paths: 2
Log Message:
Fix cmdline parsing bug: Add check of the changeno_end variable for zero.

This is a follow-up to r1917864.

The parser of the --change argument already checks the revision
number for a zero and raises an error, because there are no changes.
However, if a range is given to this argument it would not check
its second part, and the command aborts.

Command to reproduce:
$ svn diff https://svn.apache.org/repos/asf -c 1-0

Adding the check of the changeno_end variable for zero will fix
the problem.

* subversion\svn\svn.c
  (sub_main): Add check of the changeno_end variable for zero.

* subversion\tests\cmdline\diff_tests.py
  (diff_invalid_change_arg): Add test case for a diff of change,
   done in revision range '1-0' and expect an error from it.

See the dev@ mail list thread started 22 May 2024:
"[PATCH] Add check of the changeno_end variable for zero (was: [PATCH] Check
the change argument for a double minus at the start.)"
archived here and elsewhere:
https://lists.apache.org/thread/j7wb03d1yhm4f8cshr2zc14j1pzgkmbk

Found by: jun66j5

Patch by: Timofey Zhakov (tima {at} chemodax _dot_ net)


Changed paths

Path Details
Directorysubversion/trunk/subversion/svn/svn.c modified , text changed
Directorysubversion/trunk/subversion/tests/cmdline/diff_tests.py modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26