You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Chia-liang Kao <cl...@clkao.org> on 2003/11/25 10:41:20 UTC
[PATCH] svn_fs_text_changed
Avoid dir_delta from calling apply_textdelta that is actually noop with
ignore_ancestry is on. This makes many things work better in the case
of two mutually merged branches, since editors now know the source and
target stream are the same without having to construct the fulltext
from the noop txdelta. svn diff the two branches will no longer show a
lot of empty diffs.
Eventually there could be a function to eliminate the identical data in
the 'strings' for the mutually merged branches by using the same key to
free up some pages.
* include/svn_fs.h
(svn_fs_text_changed): New.
* libsvn_fs/tree.c
(svn_fs_text_changed): New.
(svn_fs_contents_changed): Fix the error message typo.
* libsvn_repos/delta.c
(delta_files): Use svn_fs_text_changed instead of
svn_fs_contents_changed with ignore_ancestry is on.
Re: [PATCH] svn_fs_text_changed
Posted by Chia-liang Kao <cl...@clkao.org>.
Actually it's even worse unless things had changed (perhaps the ra_dav
change that embbeds the delta in report response?)
Per my tests some time ago, I found the url to url diff was actually:
(see also http://www.contactor.se/~dast/svn/archive-2003-08/0071.shtml,
#518)
1. Get the delta of tree1 vs tree2 by do_diff
2. do_diff found there's no vsn for the base revision, it fetches the
target fulltext.
3. diff_editor then fetches the source fulltext
On Wed, 2003-11-26 at 09:30, C. Michael Pilato wrote:
> Okay, my original report did contain some misdiagnosis. I forgot that
> a URL-to-URL diff was:
>
> 1. Get the fulltext of tree 1.
> 2. Get the delta from tree 1 to tree 2, applied to tree 1 to
> produce tree 2.
> 3. Contextually diff tree 1 vs. tree 2.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
"C. Michael Pilato" <cm...@collab.net> writes:
> It's not the output that I'm concerned with. It's the extra work
> happening under the hood. If you still have your test scenario above,
> set a breakpoint on repos_diff.c:window_handler. If you even once see
> a non-NULL window, Subversion is being inefficient. And that's what I
> was seeing.
Okay, my original report did contain some misdiagnosis. I forgot that
a URL-to-URL diff was:
1. Get the fulltext of tree 1.
2. Get the delta from tree 1 to tree 2, applied to tree 1 to
produce tree 2.
3. Contextually diff tree 1 vs. tree 2.
So, the reason I saw fulltexts fly by was because of step 1, not step
2. Excellent, no extra textual data going over the wire. Whew.
And as for the rest of my concerns -- temporary mental breakdown. I
suffered a complete shutdown of the part of my head that knows how
textdeltas work. I think my systems are all back online now (at
least, the aforementioned ones anyway).
Apologies for unnecessary list chatter.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> "C. Michael Pilato" <cm...@collab.net> writes:
>
> > Philip Martin <ph...@codematters.co.uk> writes:
> >>
> >> You didn't make a branch, so there's no history relating dir1 to dir2,
> >> without history we always send delete plus add.
> >
> > Diff and merge pass the ignore_ancestry flag to dir-delta, which tells
> > that sucker to not pay attention to relatedness,
>
> I'd forgotten about that change.
>
> > It's not the output that I'm concerned with. It's the extra work
> > happening under the hood. If you still have your test scenario above,
> > set a breakpoint on repos_diff.c:window_handler. If you even once see
> > a non-NULL window, Subversion is being inefficient. And that's what I
> > was seeing.
>
> Using HEAD, one window_handler() call per file has a non-NULL
> window. Adding/removing --notice-ancestry makes no difference.
Right. That non-NULL window says (effectively), "grab all the source
file's bytes."
I still have some remaining doubt and confusion about textdeltas. My
assumption here is that the goal of a textdelta (in the general case)
is to inform you about how to construct some fulltext given some other
fulltext. What is the expected outcome from a no-op textdelta then (a
single, NULL window)? Does that mean, "You're final outcome should be
the empty file", or "You're final outcome is exactly the same as your
source file"?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by Philip Martin <ph...@codematters.co.uk>.
"C. Michael Pilato" <cm...@collab.net> writes:
> Philip Martin <ph...@codematters.co.uk> writes:
>>
>> You didn't make a branch, so there's no history relating dir1 to dir2,
>> without history we always send delete plus add.
>
> Diff and merge pass the ignore_ancestry flag to dir-delta, which tells
> that sucker to not pay attention to relatedness,
I'd forgotten about that change.
> It's not the output that I'm concerned with. It's the extra work
> happening under the hood. If you still have your test scenario above,
> set a breakpoint on repos_diff.c:window_handler. If you even once see
> a non-NULL window, Subversion is being inefficient. And that's what I
> was seeing.
Using HEAD, one window_handler() call per file has a non-NULL
window. Adding/removing --notice-ancestry makes no difference.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> "C. Michael Pilato" <cm...@collab.net> writes:
>
> > Chia-liang Kao <cl...@clkao.org> writes:
> >>
> >> It's quite simple: make a local import of svn tree at rev6000 or so,
> >> create a local branch, update the local import to trunk, do a merge to
> >> the local branch. Now diff the local import and the branch.
> >
> > Well, I had a tough time really understanding this description. I did
> > this:
> >
> > $ svn import /some/dir/of/stuff file://`pwd`/repos/dir1 -m dir1
> > $ svn import /some/dir/of/stuff file://`pwd`/repos/dir2 -m dir2
> > $ svn diff file://`pwd`/repos/dir1 file://`pwd`/repos/dir2
>
> You didn't make a branch, so there's no history relating dir1 to dir2,
> without history we always send delete plus add.
Diff and merge pass the ignore_ancestry flag to dir-delta, which tells
that sucker to not pay attention to relatedness, and just do a
path-based delta. If you do what I did above, you should see that
delta.c:add_file_or_dir() is never called, and that delta_files() is
always called with non-NULL source and target paths (an indication
that these are not adds).
> Do it like this and > there is history:
>
> $ stress.pl -c -F200 -D1 -N1 -n1 -x200 -s0
> $ svn cp -r1 file://`pwd`/repostress/trunk file://`pwd`/repostress/branch -m ""
> $ svn co file://`pwd`/repostress/branch wc
> $ svn merge -r1:2 file://`pwd`/repostress/trunk wc
> $ svn ci wc -m ""
> $ svn diff file://`pwd`/repostress/trunk file://`pwd`/repostress/branch
>
> 200 empty diffs for history related files with identical contents.
It's not the output that I'm concerned with. It's the extra work
happening under the hood. If you still have your test scenario above,
set a breakpoint on repos_diff.c:window_handler. If you even once see
a non-NULL window, Subversion is being inefficient. And that's what I
was seeing.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by Philip Martin <ph...@codematters.co.uk>.
"C. Michael Pilato" <cm...@collab.net> writes:
> Chia-liang Kao <cl...@clkao.org> writes:
>>
>> It's quite simple: make a local import of svn tree at rev6000 or so,
>> create a local branch, update the local import to trunk, do a merge to
>> the local branch. Now diff the local import and the branch.
>
> Well, I had a tough time really understanding this description. I did
> this:
>
> $ svn import /some/dir/of/stuff file://`pwd`/repos/dir1 -m dir1
> $ svn import /some/dir/of/stuff file://`pwd`/repos/dir2 -m dir2
> $ svn diff file://`pwd`/repos/dir1 file://`pwd`/repos/dir2
You didn't make a branch, so there's no history relating dir1 to dir2,
without history we always send delete plus add. Do it like this and
there is history:
$ stress.pl -c -F200 -D1 -N1 -n1 -x200 -s0
$ svn cp -r1 file://`pwd`/repostress/trunk file://`pwd`/repostress/branch -m ""
$ svn co file://`pwd`/repostress/branch wc
$ svn merge -r1:2 file://`pwd`/repostress/trunk wc
$ svn ci wc -m ""
$ svn diff file://`pwd`/repostress/trunk file://`pwd`/repostress/branch
200 empty diffs for history related files with identical contents.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
Chia-liang Kao <cl...@clkao.org> writes:
> On Wed, 2003-11-26 at 00:37, C. Michael Pilato wrote:
> > > With patch: average is 4 seconds; without patch: average is 6 seconds.
> > Hey, that's good news. Now, revert your change, and do those same
> > tests after teaching your window_handler to notice no-op textdeltas.
> > Or, if you don't have time, I'd be willing to do this test comparison
> > myself -- just send me your recipe.
>
> It's quite simple: make a local import of svn tree at rev6000 or so,
> create a local branch, update the local import to trunk, do a merge to
> the local branch. Now diff the local import and the branch.
Well, I had a tough time really understanding this description. I did
this:
$ svn import /some/dir/of/stuff file://`pwd`/repos/dir1 -m dir1
$ svn import /some/dir/of/stuff file://`pwd`/repos/dir2 -m dir2
$ svn diff file://`pwd`/repos/dir1 file://`pwd`/repos/dir2
And that seemed to trigger the beast. I got a whole bunch of output
that listed "Index:" lines and seperators, but empty diffs.
So I taught repos_diff.c's window_handler() and apply_textdelta() to
deal with the single-NULL-window case. But I saw no speed
improvement, and I still saw the empty contextual diff output -- two
things I did *not* expect.
Baffled, I got out my gdb.
--
The textdeltas that dir-delta are sending between two files that have
the same contents aren't single-NULL-windows. They basically say,
"Hey, to make this file look like that file, just replace all of this
file's bytes with that file's. So, so much that bright idea of mine.
Of course, it also reveals a serious efficiency problem with the
textdelta generator. I mean, had I been using ra_svn or ra_dav[1], I
would have seen every byte of my files fly by over the network as data
for a massive insert op despite the fact that the same effect could be
had by saying, "To make this file look like that file, do nothing
because it already looks like that file." Am I misunderstanding our
textdelta system at some fundamental level?
> But if people thinks it's overall a good thing, I'll polish my patch for
> the 2nd round.
There is a certain degree of symmetry with the way commits work (first
seeing if file contents truly differ, then sending those diffs). So
it's cool with me. Polish away.
In the meantime, I want to know what's up with our vdelta calculation
-- I hope my findings aren't exemplary of how inefficient they are in
the general case.
-- C-Mike
[1] I did later test this with ra-svn, and sure enough, I was seeing
the entire contents fly by instead of an empty delta.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by Chia-liang Kao <cl...@clkao.org>.
On Wed, 2003-11-26 at 00:37, C. Michael Pilato wrote:
> > With patch: average is 4 seconds; without patch: average is 6 seconds.
> Hey, that's good news. Now, revert your change, and do those same
> tests after teaching your window_handler to notice no-op textdeltas.
> Or, if you don't have time, I'd be willing to do this test comparison
> myself -- just send me your recipe.
It's quite simple: make a local import of svn tree at rev6000 or so,
create a local branch, update the local import to trunk, do a merge to
the local branch. Now diff the local import and the branch.
btw, a local ra_dav test results in 15secs vs 18secs, user time 1.15 vs
1.8, system time 0.6 vs 1.0. Supposed the noop window fixed in client
which saves all the user/sys time diff, it's still a ~2-second win.
> > But this is the case that my intention. I didn't do other tests to see
> > if it degrades normal cases.
>
> Well, yeah, those are the cases I had in mind. I rather figured you
> weren't out to degrade your own use-case. :-)
But if people thinks it's overall a good thing, I'll polish my patch for
the 2nd round.
Cheers,
CLK
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
Chia-liang Kao <cl...@clkao.org> writes:
> > You are effectively changing this code only for 'diff' and 'merge',
> > though, so perhaps its a safe change to make.
>
> I thought we agreed on irc that this behavior is correct with the
> ignore_ancestry context?
And my words above don't contradict that. 'diff' and 'merge' should
be the only operations that use the ignore_ancestry stuff.
> > I'm still curious to see some real timings. I'd love to know what
> > would happen if you made this change for all uses of dir_delta().
>
> I just did some test and was surprised. svn diffing local svn tree
> branches which have almost all files modified but the same contents,
> and just a few files different, piping the output to /dev/null:
>
> With patch: average is 4 seconds; without patch: average is 6 seconds.
>
> Also tcsh's time tells me the average unshared data/stack space (%D) is
> about half (5M vs 10M).
Hey, that's good news. Now, revert your change, and do those same
tests after teaching your window_handler to notice no-op textdeltas.
Or, if you don't have time, I'd be willing to do this test comparison
myself -- just send me your recipe.
> But this is the case that my intention. I didn't do other tests to see
> if it degrades normal cases.
Well, yeah, those are the cases I had in mind. I rather figured you
weren't out to degrade your own use-case. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by Chia-liang Kao <cl...@clkao.org>.
On Tue, 2003-11-25 at 23:34, C. Michael Pilato wrote:
> Ah, but this is slightly different. You're losing information here,
> namely the difference between "this file's contents haven't been
> changed" and "this file's contents have been changed, but happen to
> look just like those of another file". Is this difference
> significant? I really dunno.
> m<vYou are effectively changing this code only for 'diff' and 'merge',
> though, so perhaps its a safe change to make.
I thought we agreed on irc that this behavior is correct with the
ignore_ancestry context?
> I'm still curious to see some real timings. I'd love to know what
> would happen if you made this change for all uses of dir_delta().
I just did some test and was surprised. svn diffing local svn tree
branches which have almost all files modified but the same contents,
and just a few files different, piping the output to /dev/null:
With patch: average is 4 seconds; without patch: average is 6 seconds.
Also tcsh's time tells me the average unshared data/stack space (%D) is
about half (5M vs 10M).
But this is the case that my intention. I didn't do other tests to see
if it degrades normal cases.
Cheers,
CLK
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
Chia-liang Kao <cl...@clkao.org> writes:
> > Hm. Nasty. Why did you add a new public FS interface which does
> > nothing but call other public FS interfaces and is used in exactly one
> > place in the code? Bad plan, homey. Your svn_fs_text_changed()
> > implementation should just be a helper function in delta.c.
>
> I don't have any strong opinion whether this should be a public api,
That works out great -- because I do. :-)
> i just think that could be useful somehow. perhaps it could be a
> helper function in svn_io.h that wc's versioned_file_modified_p
> could also use.
Er... no. Just make it a helper in delta.c. If later we want to
expose it publicly, I suspect that svn_repos_compare_files() would be
a nice name and location for it.
> Adding md5 checks before the byte-by-byte checks could catch the
> differences earlier between some fixed-size binaries.
Yep. That'd be a good change.
> Well, it seems to me more like a consistencies fix for editors: today
> they already know if open_file is called but no apply_textdelta called,
> it means the file content isn't modified.
Ah, but this is slightly different. You're losing information here,
namely the difference between "this file's contents haven't been
changed" and "this file's contents have been changed, but happen to
look just like those of another file". Is this difference
significant? I really dunno.
You are effectively changing this code only for 'diff' and 'merge',
though, so perhaps its a safe change to make.
I'm still curious to see some real timings. I'd love to know what
would happen if you made this change for all uses of dir_delta().
> While with a wrapper to window_handler, you'll have to change every
> editor, and have call stack overhead for every window, although also
> insignificant.
Wrapper? The window_handler() just sez "If this is the first
window, and it's NULL, there's nothing to do." This is a baton
examination, nothing more.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by Chia-liang Kao <cl...@clkao.org>.
> > * include/svn_fs.h
> > (svn_fs_text_changed): New.
>
> Hm. Nasty. Why did you add a new public FS interface which does
> nothing but call other public FS interfaces and is used in exactly one
> place in the code? Bad plan, homey. Your svn_fs_text_changed()
> implementation should just be a helper function in delta.c.
I don't have any strong opinion whether this should be a public api, i
just think that could be useful somehow. perhaps it could be a helper
function in svn_io.h that wc's versioned_file_modified_p could also
use.
> Best case is if the file sizes differ. In this case the
> code runs over the bytes of the two sets of contents, and
> calculates a diff. If the file sizes do not differ, the
> code runs over the bytes of the two sets of contents until
> a differing byte is found, and then runs back over the
> bytes again to calculate a diff. It then transmits that
> diff, which is applied on the client side.
Adding md5 checks before the byte-by-byte checks could catch the
differences earlier between some fixed-size binaries.
> 2. Contents are the same.
>
> This change removes vdelta computation alone (doesn't save you a
> trip over the bytes, including undeltification to read the
> bytes). This change removes transmission of an insignificant
> amount of data (an empty delta) across the network. (You can't
> count the removal of the no-op fulltext reconstruction on the
> client side because an empty diff is trivially detectable -- our
> code could fix this right now with no server-side changes[1].)
Well, it seems to me more like a consistencies fix for editors: today
they already know if open_file is called but no apply_textdelta called,
it means the file content isn't modified. While with a wrapper to
window_handler, you'll have to change every editor, and have call stack
overhead for every window, although also insignificant.
Cheers,
CLK
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_fs_text_changed
Posted by "C. Michael Pilato" <cm...@collab.net>.
Chia-liang Kao <cl...@clkao.org> writes:
> Avoid dir_delta from calling apply_textdelta that is actually noop with
> ignore_ancestry is on. This makes many things work better in the case
> of two mutually merged branches, since editors now know the source and
> target stream are the same without having to construct the fulltext
> from the noop txdelta. svn diff the two branches will no longer show a
> lot of empty diffs.
Ah... I remember this IRC chat... :-)
> Eventually there could be a function to eliminate the identical data in
> the 'strings' for the mutually merged branches by using the same key to
> free up some pages.
This part doesn't belong in the log message. Save your hypothesizing
for the dev-list.
> * include/svn_fs.h
> (svn_fs_text_changed): New.
Hm. Nasty. Why did you add a new public FS interface which does
nothing but call other public FS interfaces and is used in exactly one
place in the code? Bad plan, homey. Your svn_fs_text_changed()
implementation should just be a helper function in delta.c.
But let's go back to the original problem you're trying to solve.
(And forgive me for forgetting what we decided on IRC.)
For files whose contents are the same, but where
svn_fs_contents_changed() doesn't catch that fact, we are
unnecessarily calculating an empty svndiff and transmitting that
across the wire. Editor implementors then go through the work of
reconstructing a fulltext that is the same as the text they already
have, and this is badness.
So, allow me to think aloud. And please correct me if I'm wrong. The
notes below assume that svn_fs_contents_changed() returns TRUE (which,
as we know, just means that the underlying DAGs point to different
rep-keys).
Today's code:
Contents Are The Same:
The code runs over the bytes of the two sets of contents,
and calculates an empty diff. It then transmits that diff,
which is applied on the client side.
Contents Differ:
The code runs over the bytes of the two sets of contents,
and calculates a diff. It then transmits that diff, which
is applied on the client side.
With your changes:
Contents Are The Same:
The code runs over the bytes of the two sets of contents,
and determines that they are the same. No diff is sent,
no diff is applied.
Contents Differ:
Best case is if the file sizes differ. In this case the
code runs over the bytes of the two sets of contents, and
calculates a diff. If the file sizes do not differ, the
code runs over the bytes of the two sets of contents until
a differing byte is found, and then runs back over the
bytes again to calculate a diff. It then transmits that
diff, which is applied on the client side.
I'm going to rank (based only on my gut instinct) and evaluate the
rareness of the three code forks from most rare to least:
1. Contents differ, but have the same filesize.
This change adds additional examination of the bytes of the
files, which includes additional undeltification in order to
read those bytes.
2. Contents are the same.
This change removes vdelta computation alone (doesn't save you a
trip over the bytes, including undeltification to read the
bytes). This change removes transmission of an insignificant
amount of data (an empty delta) across the network. (You can't
count the removal of the no-op fulltext reconstruction on the
client side because an empty diff is trivially detectable -- our
code could fix this right now with no server-side changes[1].)
3. Contents have different file sizes.
No real change from current behavior (aside from a pair of
database hits per-file to get those sizes).
Well, it looks alright on paper, I guess. Borderline unnecessary code
churn, and I'd like to see some figures on how performance is
affected. I still say the new FS interface is bogus -- either make
svn_fs_contents_changed() tell the whole truth all the time (which
will effect *all* uses of dir_delta) or put that code into a delta.c
helper function.
-- C-Mike
[1] And I'm going to take a stab at doing so after sending this mail.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dir_delta content check
Posted by "C. Michael Pilato" <cm...@collab.net>.
Chia-liang Kao <cl...@clkao.org> writes:
> Revised patch with cmpilato's comments and additional md5 check.
>
> Avoid dir_delta from calling apply_textdelta that is actually noop
> with ignore_ancestry is on. This makes many things work better in the
> case of two mutually merged branches, since editors now know the
> source and target stream are the same without having to construct the
> fulltext from the noop txdelta. svn diff the two branches will no
> longer show a lot of empty diffs.
>
> * libsvn_repos/delta.c
> (compare_files): New.
> (delta_files): Use compare_files instead of svn_fs_contents_changed
> with ignore_ancestry is on.
I'll review and apply this soon.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dir_delta content check
Posted by "C. Michael Pilato" <cm...@collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> (It also means: whenever you use an apostrophe with a pronoun,
> you're using a contraction, not a possessive. :) )
An indication of my state of mind at the time, I can assure you.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: OT: apostrophes [was: Re: [PATCH] dir_delta content check]
Posted by kf...@collab.net.
Julian Foad <ju...@btopenworld.com> writes:
> If Greg's statement is correct, then it needs some further
> explanation as most of us have forgotton what might originally have
> come between the "Greg" and the "s" before it was deemed to be just
> the way we write a possessive.
I have the answer to your question, actually.
But please mail me privately for details; this is getting far away
from Subversion now, so we shouldn't bore the rest of the list with
it :-).
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
OT: apostrophes [was: Re: [PATCH] dir_delta content check]
Posted by Julian Foad <ju...@btopenworld.com>.
Greg Noel wrote:
> On Wednesday, Nov 26, 2003, at 08:19 US/Pacific, Greg Hudson wrote:
>
>> ... (It also means: whenever you use an apostrophe with a pronoun,
>> you're using a contraction, not a possessive. :) )
>
> Ah, that's close, but not quite right. It really means: whenever you
> use an apostrophe, you're using a contraction. There's no need to
> embroider it with qualifications about pronouns or possessives; it's the
> same rule in all cases.
>
> This is the Rule of the Apostrophe and it's by far the most regular rule
> in English. There's only one exception, and that's so rare that you
> will probably never encounter it in a lifetime of writing.
>
> The Rule of the Apostrophe is so simple that it appalls me that it's
> abused so often. Yes, I know that illiteracy is rampant, but this rule
> is so easy to use correctly that there's no excuse for getting it wrong.
>
> Whenever you use an apostrophe, you're using a contraction. Period.
If Greg's statement is correct, then it needs some further explanation as most of us have forgotton what might originally have come between the "Greg" and the "s" before it was deemed to be just the way we write a possessive.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dir_delta content check
Posted by Greg Noel <Gr...@san.rr.com>.
On Wednesday, Nov 26, 2003, at 08:19 US/Pacific, Greg Hudson wrote:
> ... (It also means: whenever you use an apostrophe with a pronoun,
> you're using a contraction, not a possessive. :) )
Ah, that's close, but not quite right. It really means: whenever you
use an apostrophe, you're using a contraction. There's no need to
embroider it with qualifications about pronouns or possessives; it's
the same rule in all cases.
This is the Rule of the Apostrophe and it's by far the most regular
rule in English. There's only one exception, and that's so rare that
you will probably never encounter it in a lifetime of writing.
The Rule of the Apostrophe is so simple that it appalls me that it's
abused so often. Yes, I know that illiteracy is rampant, but this rule
is so easy to use correctly that there's no excuse for getting it wrong.
Whenever you use an apostrophe, you're using a contraction. Period.
-- Greg Noel, retired UNIX guru
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dir_delta content check
Posted by Greg Hudson <gh...@MIT.EDU>.
On Wed, 2003-11-26 at 03:19, C. Michael Pilato wrote:
> I mean,
> is there ever a time for any update-ish operation (update, switch,
> diff, merge, status -u) where it's important to know the difference
> between "this thing's contents have changed, but the result is a
> no-op" and "this things contents have no changed" ?
I don't think so. It should be fine to always say the latter.
From another message:
> I still have some remaining doubt and confusion about textdeltas. My
> assumption here is that the goal of a textdelta (in the general case)
> is to inform you about how to construct some fulltext given some other
> fulltext. What is the expected outcome from a no-op textdelta then (a
> single, NULL window)? Does that mean, "You're final outcome should be
> the empty file", or "You're final outcome is exactly the same as your
> source file"?
I think you got here on your own, but it means: "your final outcome
should be the empty file." (It also means: whenever you use an
apostrophe with a pronoun, you're using a contraction, not a possessive.
:) )
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dir_delta content check
Posted by "C. Michael Pilato" <cm...@collab.net>.
Chia-liang Kao <cl...@clkao.org> writes:
> Revised patch with cmpilato's comments and additional md5 check.
>
> Avoid dir_delta from calling apply_textdelta that is actually noop
> with ignore_ancestry is on. This makes many things work better in the
> case of two mutually merged branches, since editors now know the
> source and target stream are the same without having to construct the
> fulltext from the noop txdelta. svn diff the two branches will no
> longer show a lot of empty diffs.
>
> * libsvn_repos/delta.c
> (compare_files): New.
> (delta_files): Use compare_files instead of svn_fs_contents_changed
> with ignore_ancestry is on.
Okay, I've cleaned up your patch (added lots of commentary, and fixed
some style things). And now it has been committed as revision 7852.
Dude. This sped up my test-cases by some 300% !!
So, let me start a theoretical discussion (open to any watching eyes).
I like that this is symmetrical with how commits work -- are there any
reasons why we wouldn't want dir-delta to *always* do this? I mean,
is there ever a time for any update-ish operation (update, switch,
diff, merge, status -u) where it's important to know the difference
between "this thing's contents have changed, but the result is a
no-op" and "this things contents have no changed" ?
Update and switch don't care, because they just do contextual merges
of the textdeltas anyway. Diff and merge certainly don't. Status is
iffy -- we have a field in the status structure for
repos_text_changed. But then again, we also have a
repos_prop_changed(), and it only gets set if there were real diffs in
the properties, not just because the props were touched.
Therefore, I'm seriously tempted to make dir-delta always use this new
code.
NOTE: Before anyone suggests modifying svn_fs_contents_changed() to do
this more careful checking -- don't. The repository dumper code
actually does want to preserve the history of whether edits -- if even
no-ops -- happened on a node's props or contents, so the functionality
provided by svn_fs_props_changed() and svn_fs_contents_changed() must
remain unchanged (though, the API promises need a *serious* overhaul).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] dir_delta content check
Posted by Chia-liang Kao <cl...@clkao.org>.
Revised patch with cmpilato's comments and additional md5 check.
Avoid dir_delta from calling apply_textdelta that is actually noop
with ignore_ancestry is on. This makes many things work better in the
case of two mutually merged branches, since editors now know the
source and target stream are the same without having to construct the
fulltext from the noop txdelta. svn diff the two branches will no
longer show a lot of empty diffs.
* libsvn_repos/delta.c
(compare_files): New.
(delta_files): Use compare_files instead of svn_fs_contents_changed
with ignore_ancestry is on.