You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by leo ponton <po...@gmail.com> on 2014/12/12 11:07:32 UTC

svnlook diff misbehaving

In a windows pre-commit hook batch file I'm using svnlook diff to generate
patch files to apply to an isolated repository:



    svnlook diff -t%TXN% %REPOS%\ > tmp\%FILENAME%



Most times it works, but occassionally, it'll truncate the code in the
diff, e.g.



    +              <td align="right" class="smallgreytext #backstyle#">

    +                  <c



I’ve seen some similar reports dating back to 2009, but they were marked as
unable to reproduce (WORKSFORME):
http://subversion.tigris.org/issues/show_bug.cgi?id=3522



The issue doesn’t seem to occur when using svn diff, implying that the diff
util is either a different version or has a different configuration.


Can anyone shed some light on this?


Thanks,


Leo

Re: svnlook diff misbehaving

Posted by leo ponton <po...@gmail.com>.
I'll look at that, thanks. I'm finished now for the rest of the year (!),
so it'll be January before I post anything.

Leo

On 12 December 2014 at 15:54, Philip Martin <ph...@wandisco.com>
wrote:

> leo ponton <po...@gmail.com> writes:
>
> > We're using the CollabNet 1.8.10 release, so fairly up to date.
> > I've now reconfigured the hooks to run a svn diff in the post-commit.
> It's
> > just a little clumsy as I have to construct the repo url from bits. It
> also
> > means that the commit cannot be interrupted if the patch generation
> fails.
>
> If you can detect when the pre-commit generates an invalid diff then you
> could make a backup of the relevant transaction subdir and protorev
> file.  It might then be possible to reproduce the problem, in which case
> it should be easy to debug.
>
> --
> Philip Martin | Subversion Committer
> WANdisco // *Non-Stop Data*
>

Re: svnlook diff misbehaving

Posted by Philip Martin <ph...@wandisco.com>.
leo ponton <po...@gmail.com> writes:

> We're using the CollabNet 1.8.10 release, so fairly up to date.
> I've now reconfigured the hooks to run a svn diff in the post-commit. It's
> just a little clumsy as I have to construct the repo url from bits. It also
> means that the commit cannot be interrupted if the patch generation fails.

If you can detect when the pre-commit generates an invalid diff then you
could make a backup of the relevant transaction subdir and protorev
file.  It might then be possible to reproduce the problem, in which case
it should be easy to debug.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: svnlook diff misbehaving

Posted by leo ponton <po...@gmail.com>.
We're using the CollabNet 1.8.10 release, so fairly up to date.
I've now reconfigured the hooks to run a svn diff in the post-commit. It's
just a little clumsy as I have to construct the repo url from bits. It also
means that the commit cannot be interrupted if the patch generation fails.

Leo

On 12 December 2014 at 13:15, Johan Corveleyn <jc...@gmail.com> wrote:

> On Fri, Dec 12, 2014 at 11:07 AM, leo ponton <po...@gmail.com> wrote:
> > In a windows pre-commit hook batch file I'm using svnlook diff to
> generate
> > patch files to apply to an isolated repository:
> >
> >
> >
> >     svnlook diff -t%TXN% %REPOS%\ > tmp\%FILENAME%
> >
> >
> >
> > Most times it works, but occassionally, it'll truncate the code in the
> diff,
> > e.g.
> >
> >
> >
> >     +              <td align="right" class="smallgreytext #backstyle#">
> >
> >     +                  <c
> >
> >
> >
> > I’ve seen some similar reports dating back to 2009, but they were marked
> as
> > unable to reproduce (WORKSFORME):
> > http://subversion.tigris.org/issues/show_bug.cgi?id=3522
> >
> >
> >
> > The issue doesn’t seem to occur when using svn diff, implying that the
> diff
> > util is either a different version or has a different configuration.
> >
> >
> > Can anyone shed some light on this?
> >
>
> What version is your svn client, and what version is your svnlook?
>
> There were some "recent" fixes in the diff code [1]. These fixes were
> part of 1.8.0 (and backported to the latest 1.7.x releases). So if
> your svnlook is a bit older, you might still be hit by these bugs.
>
> [1] Fixes in the diff code, included in 1.8.0:
> http://subversion.tigris.org/issues/show_bug.cgi?id=4283 (When the
> identical suffix starts at chunk boundary, "svn diff" produces
> incorrect diff)
> http://subversion.tigris.org/issues/show_bug.cgi?id=4270 (diff -cN
> shows wrong line changed)
> http://subversion.tigris.org/issues/show_bug.cgi?id=4133 ("diff -x -w"
> showing wrong change)
> http://subversion.tigris.org/issues/show_bug.cgi?id=4339 (diff suffix
> scanning invalid read at chunk boundary)
>
> --
> Johan
>

Re: svnlook diff misbehaving

Posted by Johan Corveleyn <jc...@gmail.com>.
On Fri, Dec 12, 2014 at 11:07 AM, leo ponton <po...@gmail.com> wrote:
> In a windows pre-commit hook batch file I'm using svnlook diff to generate
> patch files to apply to an isolated repository:
>
>
>
>     svnlook diff -t%TXN% %REPOS%\ > tmp\%FILENAME%
>
>
>
> Most times it works, but occassionally, it'll truncate the code in the diff,
> e.g.
>
>
>
>     +              <td align="right" class="smallgreytext #backstyle#">
>
>     +                  <c
>
>
>
> I’ve seen some similar reports dating back to 2009, but they were marked as
> unable to reproduce (WORKSFORME):
> http://subversion.tigris.org/issues/show_bug.cgi?id=3522
>
>
>
> The issue doesn’t seem to occur when using svn diff, implying that the diff
> util is either a different version or has a different configuration.
>
>
> Can anyone shed some light on this?
>

What version is your svn client, and what version is your svnlook?

There were some "recent" fixes in the diff code [1]. These fixes were
part of 1.8.0 (and backported to the latest 1.7.x releases). So if
your svnlook is a bit older, you might still be hit by these bugs.

[1] Fixes in the diff code, included in 1.8.0:
http://subversion.tigris.org/issues/show_bug.cgi?id=4283 (When the
identical suffix starts at chunk boundary, "svn diff" produces
incorrect diff)
http://subversion.tigris.org/issues/show_bug.cgi?id=4270 (diff -cN
shows wrong line changed)
http://subversion.tigris.org/issues/show_bug.cgi?id=4133 ("diff -x -w"
showing wrong change)
http://subversion.tigris.org/issues/show_bug.cgi?id=4339 (diff suffix
scanning invalid read at chunk boundary)

-- 
Johan