Hi,

When I was fixing a bug related to the change revision argument (-c),
I noticed that the function which parses the change revision argument
is implemented implicitly in the sub_main (in file svn.c) [1], while
other revision parsers such as svn_opt_parse_revision_to_range
are implemented in the opt.c file [2]. These functions do similar
things. It follows that a function like svn_opt_parse_change_to_range
can be easily factored-out from the svn.c file into the opt.c file and
also be a part of the public API.

[1] subversion\svn\svn.c:2331 at r1917853
[2] subversion\libsvn_subr\opt.c:615 at r1917853

Pros:
- The new function can be tested by unit tests and be a part of the public API.
- There would be less code in the svn.c file.

Cons:
- The error messages have to be converted into one.

I did this in my working copy and the code got a lot better.

What do you think?

--
Timofei Zhakov

Reply via email to