You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Fabien COELHO <fa...@coelho.net> on 2005/11/12 09:12:03 UTC

[PATCH} move and extend 'svnversion' functionnality in libsvn_wc

Dear developers,

This patch is a follow-up to a previous submission which dealt with moving 
'svnversion' as a 'svn' subcommand, see:

 	http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=107766

This submission does NOT do that, but just moves the functionnality in 
libsvn_wc as a prerequisite to such a change. Anyway, it seems more 
interesting to have the function in a library than as a special command 
only.



PATCH REQUIRES A PRIOR COPY

sh> svn cp subversion/svnversion/main.c \
 	   subversion/libsvn_client/revision_status.c
sh> patch -P0 -i svnversion.patch



MESSAGE

[[[
  - move 'svnversion' functionnality as a function in libsvn_wc,
    so that it can be used by other client applications,
    eg possibly 'svn' later.
  - there has been a little rewrite of the function so that is just
    uses in libsvn_wc, although the initial implementation was
    based on libsvn_client.
  - the function is extended, it also collects some statistics.
    while the whole working copy is walked thru, it does not cost
    a lot to just count the files.
  - 'svnversion' calls the new function, and does not use 'libsvn_client'
    anymore, so the dependency is removed from 'build.conf'.
  - added option '--verbose' shows collected statistics.
  - added option '--no-ignore' disregards 'svn:ignore' and default ignores.

* subversion/include/svn_wc.h:
   added new structs and function.
* subversion/libsvn_wc/revision_status.c:
   new file which implements 'svn_wc_revision_status' function.
* subversion/svnversion/main.c:
   call new function instead of doing the job.
* build.conf:
   fix dependencies of svnversion.
]]]

-- 
Fabien.

Re: [PATCH} move and extend 'svnversion' functionnality in libsvn_wc

Posted by Fabien COELHO <fa...@coelho.net>.
>> Two patches would change the signature of the result structure 
>
> That depends on the order in which you make the two patches.  If you make the 
> enhancements first, then there won't be any such change within libsvn_wc.

I'm not interested in developping the stuff twice;-)

>> introduced added to libsvn_wc. Isn't it an issue that the signature of a 
>> library function is changed twice in two patches? No problem with me, just 
>> that I would expect lib functions to be very stable.
>
> It doesn't matter if they change during development of a new minor version 
> (Subversion v1.4).  It only matters if the API is introduced in one version 
> and (e.g. 1.4) and then has to be changed in a later version (>= 1.5).

Ok.

I'll edit out the extension, and then add it back later if the library 
moved is accepted.

-- 
Fabien.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH} move and extend 'svnversion' functionnality in libsvn_wc

Posted by Julian Foad <ju...@btopenworld.com>.
Fabien COELHO wrote:
> 
>> However, your patch does not just move it; your patch also extends it. 
>> Please split this into two separate patches.  (Obviously it will 
>> matter which one is applied first.)
> 
> That can be done.
> 
>> For the patch that extends the functionality of svnversion, please say 
>> what the extensions are and why you want them.
> 
> Two patches would change the signature of the result structure 

That depends on the order in which you make the two patches.  If you make the 
enhancements first, then there won't be any such change within libsvn_wc.

> introduced added to libsvn_wc. Isn't it an issue that the signature of a 
> library function is changed twice in two patches? No problem with me, 
> just that I would expect lib functions to be very stable.

It doesn't matter if they change during development of a new minor version 
(Subversion v1.4).  It only matters if the API is introduced in one version and 
(e.g. 1.4) and then has to be changed in a later version (>= 1.5).

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH} move and extend 'svnversion' functionnality in libsvn_wc

Posted by Fabien COELHO <fa...@coelho.net>.
Hello,

> Yes, it seems like a good idea to move that function into a library.
>
> However, your patch does not just move it; your patch also extends it. 
> Please split this into two separate patches.  (Obviously it will matter which 
> one is applied first.)

That can be done.

> For the patch that extends the functionality of svnversion, please say what 
> the extensions are and why you want them.

Two patches would change the signature of the result structure introduced 
added to libsvn_wc. Isn't it an issue that the signature of a library 
function is changed twice in two patches? No problem with me, just that I 
would expect lib functions to be very stable.

-- 
Fabien.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH} move and extend 'svnversion' functionnality in libsvn_wc

Posted by Julian Foad <ju...@btopenworld.com>.
Fabien COELHO wrote:
> 
> This patch is a follow-up to a previous submission which dealt with 
> moving 'svnversion' as a 'svn' subcommand, see:
> 
>     http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=107766
> 
> This submission does NOT do that, but just moves the functionnality in 
> libsvn_wc as a prerequisite to such a change. Anyway, it seems more 
> interesting to have the function in a library than as a special command 
> only.

Yes, it seems like a good idea to move that function into a library.

However, your patch does not just move it; your patch also extends it.  Please 
split this into two separate patches.  (Obviously it will matter which one is 
applied first.)

For the patch that extends the functionality of svnversion, please say what the 
extensions are and why you want them.

Thanks.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org