You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Küng <to...@gmail.com> on 2007/03/01 17:56:12 UTC

[PATCH] allow svn_opt_revision_working in svn_client_cat2()

Hi,

The svn_client_cat2() function currently doesn't work correctly if the 
revision is specified as svn_opt_revision_working. In the main function, 
there's a check for BASE, COMMITTED and UNSPECIFIED revisions to do a 
local cat, but that check doesn't use WORKING.
The function cat_local_file() however correctly uses 
svn_opt_revision_working to do the job (but of course it's never called 
that way).

The attached patch fixes this.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Re: [PATCH] allow svn_opt_revision_working in svn_client_cat2()

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
On Fri, 02 Mar 2007, Daniel Rall wrote:

> On Thu, 01 Mar 2007, Stefan Küng wrote:
> 
> > The svn_client_cat2() function currently doesn't work correctly if the 
> > revision is specified as svn_opt_revision_working. In the main function, 
> > there's a check for BASE, COMMITTED and UNSPECIFIED revisions to do a 
> > local cat, but that check doesn't use WORKING.
> > The function cat_local_file() however correctly uses 
> > svn_opt_revision_working to do the job (but of course it's never called 
> > that way).
> ...
> > [[[
> > Handle svn_opt_revision_working properly in svn_client_cat2().
> > * subversion/libsvn_client/cat.c : Allow svn_opt_revision_working
> > ]]]

Committed to trunk in r23556.

Re: [PATCH] allow svn_opt_revision_working in svn_client_cat2()

Posted by Daniel Rall <dl...@collab.net>.
On Thu, 01 Mar 2007, Stefan Küng wrote:

> The svn_client_cat2() function currently doesn't work correctly if the 
> revision is specified as svn_opt_revision_working. In the main function, 
> there's a check for BASE, COMMITTED and UNSPECIFIED revisions to do a 
> local cat, but that check doesn't use WORKING.
> The function cat_local_file() however correctly uses 
> svn_opt_revision_working to do the job (but of course it's never called 
> that way).
...
> [[[
> Handle svn_opt_revision_working properly in svn_client_cat2().
> * subversion/libsvn_client/cat.c : Allow svn_opt_revision_working
> ]]]

> Index: subversion/libsvn_client/cat.c
> ===================================================================
> --- subversion/libsvn_client/cat.c	(revision 23293)
> +++ subversion/libsvn_client/cat.c	(working copy)
> @@ -176,9 +176,11 @@
>  
>    if (! svn_path_is_url(path_or_url)
>        && (peg_revision->kind == svn_opt_revision_base
> +          || peg_revision->kind == svn_opt_revision_working
>            || peg_revision->kind == svn_opt_revision_committed
>            || peg_revision->kind == svn_opt_revision_unspecified)
>        && (revision->kind == svn_opt_revision_base
> +          || revision->kind == svn_opt_revision_working
>            || revision->kind == svn_opt_revision_committed
>            || revision->kind == svn_opt_revision_unspecified))
>      {

Thanks Stefan, looks good.
Running tests on it now, with plans to commit...