You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Stephen Davis <su...@soundgeek.org> on 2005/04/03 20:46:17 UTC
svn cat -r BASE hits the network?
For my CodeWarrior plugin
(http://www.soundgeek.org/software/SubversionPlugin.html), I use
svn_client_cat() to feed the entire file contents into the CodeWarrior
visual diff engine. Unfortunately, for diffs against BASE,
svn_client_cat() always hits the repository which obvious makes local
diffs much slower than they need to be (and makes offline editing a
problem).
I imagine this will be a fairly common-place way to do diffs in GUI
plugins so this seems like a bug/optimization target. I wound my way
through the client diff and revert code but it was definitely
non-trivial to find the text-base file for my purpose. Am I
overlooking some obvious (and straight-forward) client lib
functionality for finding the text-base file so I can feed its contents
into the visual diff engine?
thanks,
stephen
P.S. I have not actually tried this against trunk but I looked at the
cat-cmd.c code in trunk and it's basically the same.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cat -r BASE hits the network?
Posted by Stephen Davis <su...@soundgeek.org>.
On Apr 3, 2005, at 1:51 PM, Max Bowsher wrote:
> Stephen Davis wrote:
>> For my CodeWarrior plugin
>> (http://www.soundgeek.org/software/SubversionPlugin.html), I use
>> svn_client_cat() to feed the entire file contents into the CodeWarrior
>> visual diff engine. Unfortunately, for diffs against BASE,
>> svn_client_cat() always hits the repository which obvious makes local
>> diffs much slower than they need to be (and makes offline editing a
>> problem).
>> I imagine this will be a fairly common-place way to do diffs in GUI
>> plugins so this seems like a bug/optimization target. I wound my way
>> through the client diff and revert code but it was definitely
>> non-trivial to find the text-base file for my purpose. Am I
>> overlooking some obvious (and straight-forward) client lib
>> functionality for finding the text-base file so I can feed its
>> contents
>> into the visual diff engine?
>
> Known bug, just no one seems to be particularly motivated to fix it.
> Perhaps you feel like writing a patch?
Heh, I'll give it a shot.
stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cat -r BASE hits the network?
Posted by John Szakmeister <jo...@szakmeister.net>.
On Sunday 03 April 2005 19:24, Max Bowsher wrote:
> John Szakmeister wrote:
> > On Sunday 03 April 2005 16:51, Max Bowsher wrote:
> >> Stephen Davis wrote:
> >>> For my CodeWarrior plugin
> >>> (http://www.soundgeek.org/software/SubversionPlugin.html), I use
> >>> svn_client_cat() to feed the entire file contents into the
> >>> CodeWarrior visual diff engine. Unfortunately, for diffs against
> >>> BASE,
> >>> svn_client_cat() always hits the repository which obvious makes
> >>> local diffs much slower than they need to be (and makes offline
> >>> editing a problem).
> >>>
[snip]
> >> Known bug, just no one seems to be particularly motivated to fix it.
> >> Perhaps you feel like writing a patch?
> >
> > You know, every time I go to hit this particular issue, I get wrapped
> > around the axle because export and cat aren't all that different. In
> > particular, I hate that all the logic for translating keywords and
> > line endings will basically have to be repeated. I actually have a
> > patch with just the logic copied over from the export code... but
> > it's just wrong not to share the code.
> >
> > Would you object to having an 'svn_client__cat_internal()' that would
> > copy the contents to a stream? Then we can use the same function to
> > export the individual files.
>
> There's absolutely nothing wrong with having internal client utility
> functions. That's probably not the best name for it, but otherwise, no
> problem at all.
> But this thread should probably transfer to the dev@ list now.
Actually, I remembered the other reason why I didn't do this. We seem to
have dueling standards in our client interface, and fixing this correctly
(IMHO) involves changing the command-line interface.
Currently, 'svn cat wc-path' defaults to picking the BASE revision of the
file, while other commands default to WORKING. My opinion is that it
should default to WORKING, or it should default to HEAD. BASE just
doesn't make sense (and actually, I believe this may have changed with
the introduction of the peg revision stuff... it used to default to
HEAD).
But, this issue has been around long enough. I'm going to proceed without
changing the default. It would be nice to finally get some resolution as
to what the appropriate defaults should be (there is an open issue about
it, but tigris seems to be running very slowly right now)..
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn cat -r BASE hits the network?
Posted by John Szakmeister <jo...@szakmeister.net>.
On Sunday 03 April 2005 19:24, Max Bowsher wrote:
[snip]
>
> There's absolutely nothing wrong with having internal client utility
> functions. That's probably not the best name for it, but otherwise, no
> problem at all.
> But this thread should probably transfer to the dev@ list now.
Turns out there just wasn't a clean way to divide the
functionality. :-( So I went ahead with a more straightforward fix.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cat -r BASE hits the network?
Posted by Max Bowsher <ma...@ukf.net>.
John Szakmeister wrote:
> On Sunday 03 April 2005 16:51, Max Bowsher wrote:
>> Stephen Davis wrote:
>>> For my CodeWarrior plugin
>>> (http://www.soundgeek.org/software/SubversionPlugin.html), I use
>>> svn_client_cat() to feed the entire file contents into the
>>> CodeWarrior visual diff engine. Unfortunately, for diffs against
>>> BASE,
>>> svn_client_cat() always hits the repository which obvious makes local
>>> diffs much slower than they need to be (and makes offline editing a
>>> problem).
>>>
>>> I imagine this will be a fairly common-place way to do diffs in GUI
>>> plugins so this seems like a bug/optimization target. I wound my way
>>> through the client diff and revert code but it was definitely
>>> non-trivial to find the text-base file for my purpose. Am I
>>> overlooking some obvious (and straight-forward) client lib
>>> functionality for finding the text-base file so I can feed its
>>> contents into the visual diff engine?
>>
>> Known bug, just no one seems to be particularly motivated to fix it.
>> Perhaps you feel like writing a patch?
>
> You know, every time I go to hit this particular issue, I get wrapped
> around the axle because export and cat aren't all that different. In
> particular, I hate that all the logic for translating keywords and line
> endings will basically have to be repeated. I actually have a patch with
> just the logic copied over from the export code... but it's just wrong
> not to share the code.
>
> Would you object to having an 'svn_client__cat_internal()' that would copy
> the contents to a stream? Then we can use the same function to export
> the individual files.
There's absolutely nothing wrong with having internal client utility
functions. That's probably not the best name for it, but otherwise, no
problem at all.
But this thread should probably transfer to the dev@ list now.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cat -r BASE hits the network?
Posted by John Szakmeister <jo...@szakmeister.net>.
On Sunday 03 April 2005 16:51, Max Bowsher wrote:
> Stephen Davis wrote:
> > For my CodeWarrior plugin
> > (http://www.soundgeek.org/software/SubversionPlugin.html), I use
> > svn_client_cat() to feed the entire file contents into the
> > CodeWarrior visual diff engine. Unfortunately, for diffs against
> > BASE,
> > svn_client_cat() always hits the repository which obvious makes local
> > diffs much slower than they need to be (and makes offline editing a
> > problem).
> >
> > I imagine this will be a fairly common-place way to do diffs in GUI
> > plugins so this seems like a bug/optimization target. I wound my way
> > through the client diff and revert code but it was definitely
> > non-trivial to find the text-base file for my purpose. Am I
> > overlooking some obvious (and straight-forward) client lib
> > functionality for finding the text-base file so I can feed its
> > contents into the visual diff engine?
>
> Known bug, just no one seems to be particularly motivated to fix it.
> Perhaps you feel like writing a patch?
You know, every time I go to hit this particular issue, I get wrapped
around the axle because export and cat aren't all that different. In
particular, I hate that all the logic for translating keywords and line
endings will basically have to be repeated. I actually have a patch with
just the logic copied over from the export code... but it's just wrong
not to share the code.
Would you object to having an 'svn_client__cat_internal()' that would copy
the contents to a stream? Then we can use the same function to export
the individual files.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cat -r BASE hits the network?
Posted by Max Bowsher <ma...@ukf.net>.
Stephen Davis wrote:
> For my CodeWarrior plugin
> (http://www.soundgeek.org/software/SubversionPlugin.html), I use
> svn_client_cat() to feed the entire file contents into the CodeWarrior
> visual diff engine. Unfortunately, for diffs against BASE,
> svn_client_cat() always hits the repository which obvious makes local
> diffs much slower than they need to be (and makes offline editing a
> problem).
>
> I imagine this will be a fairly common-place way to do diffs in GUI
> plugins so this seems like a bug/optimization target. I wound my way
> through the client diff and revert code but it was definitely
> non-trivial to find the text-base file for my purpose. Am I
> overlooking some obvious (and straight-forward) client lib
> functionality for finding the text-base file so I can feed its contents
> into the visual diff engine?
Known bug, just no one seems to be particularly motivated to fix it.
Perhaps you feel like writing a patch?
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org