You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2002/01/06 13:26:53 UTC
'svn diff -rREV1:REV2' code organisation
Hi
I have some code that implements 'svn diff -rREV1:REV2' i.e. comparing
two repository versions. It's not yet complete but it is producing
diffs. It implements one of the ideas discussed last month: sending a
request for the REV1 to REV2 diff, using that to drive an editor which
sends separate requests for REV1 copies of files as required. It uses
the same ra session for all requests. This has the big advantage that
no directory hierarchy needs to be constructed.
At present I have this new editor sitting in libsvn_wc. This is a
little odd, since there is no working copy involved. Temporary files
get created but they are just dumped in the current directory at
present. The main reason the new code sits in libsvn_wc is that it
uses the svn_wc_diff_cmd_t type introduced with the 'svn diff -rREV'
code. The new code also has a dependency on svn_ra.h, which libsvn_wc
already has, but most of the other libsvn_* don't.
So my question is where do you think I should put this new editor? Is
it OK to leave it in libsvn_wc? If it gets moved then where should
the svn_wc_diff_cmd_t type go so that the existing 'svn diff -rREV'
editor in libsvn_wc and the new editor can both use it?
--
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn diff -rREV1:REV2' code organisation
Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:
> Philip Martin <ph...@codematters.co.uk> writes:
>
> > The new code also has a dependency on svn_ra.h, which libsvn_wc
> > already has, but most of the other libsvn_* don't.
>
> libsvn_wc should *not* depend on RA at all. If you see such a
> dependency already, we should fix it.
From svn_wc.h:
#include "svn_ra.h" /* for svn_ra_reporter_t type */
.
.
.
svn_error_t *
svn_wc_crawl_revisions (svn_stringbuf_t *path,
const svn_ra_reporter_t *reporter,
void *report_baton,
svn_boolean_t restore_files,
svn_boolean_t recurse,
apr_pool_t *pool);
>
> > So my question is where do you think I should put this new editor? Is
> > it OK to leave it in libsvn_wc? If it gets moved then where should
> > the svn_wc_diff_cmd_t type go so that the existing 'svn diff -rREV'
> > editor in libsvn_wc and the new editor can both use it?
>
> libsvn_client's job is to wed WC and RA together. If you need both, I
> guess it should go into libsvn_client. That way, it's also okay to
> leave svn_wc_diff_cmd_t in WC.
OK, thanks.
--
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn diff -rREV1:REV2' code organisation
Posted by Ben Collins-Sussman <su...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> The new code also has a dependency on svn_ra.h, which libsvn_wc
> already has, but most of the other libsvn_* don't.
libsvn_wc should *not* depend on RA at all. If you see such a
dependency already, we should fix it.
> So my question is where do you think I should put this new editor? Is
> it OK to leave it in libsvn_wc? If it gets moved then where should
> the svn_wc_diff_cmd_t type go so that the existing 'svn diff -rREV'
> editor in libsvn_wc and the new editor can both use it?
libsvn_client's job is to wed WC and RA together. If you need both, I
guess it should go into libsvn_client. That way, it's also okay to
leave svn_wc_diff_cmd_t in WC.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org