Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Large patch/diff refuses to apply

2 views
Skip to first unread message

Sean Bruno

unread,
Oct 6, 2016, 9:58:22 AM10/6/16
to freebsd-current
I'm doing a large amount of change to ixgbe(4) in support of IFLIB
implementations and running into failures when trying to apply large
diffs. This is causing phabricator reviews to be unuseable as well.

I've setup two trees to test this. The first tree is used to generate
the diff and the second (vanilla) is used to apply the diff. The entire
patch fails to apply, so I'm assuming that the size of the diff is
failing because of a sanity check or something.

https://people.freebsd.org/~sbruno/test.diff

% svn stat sys/dev/ixgbe/if_ix.c
M sys/dev/ixgbe/if_ix.c

% svn diff sys/dev/ixgbe/if_ix.c > ~/test.diff


% cd ../vanilla/

% patch -p0 < ~/test.diff
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/dev/ixgbe/if_ix.c
|===================================================================
|--- sys/dev/ixgbe/if_ix.c (revision 306673)
|+++ sys/dev/ixgbe/if_ix.c (working copy)
--------------------------
Patching file sys/dev/ixgbe/if_ix.c using Plan A...
Hunk #1 failed at 1.
1 out of 1 hunks failed--saving rejects to sys/dev/ixgbe/if_ix.c.rej
done

% ls -l sys/dev/ixgbe/if_ix.c*
-rw-r--r-- 1 sbruno wheel 166692 Oct 6 06:41 sys/dev/ixgbe/if_ix.c
-rw-r--r-- 1 sbruno wheel 166692 Oct 6 06:37 sys/dev/ixgbe/if_ix.c.orig
-rw-r--r-- 1 sbruno wheel 172779 Oct 6 06:41 sys/dev/ixgbe/if_ix.c.rej

% svn stat sys/dev/ixgbe/
? sys/dev/ixgbe/if_ix.c.orig



signature.asc

Slawa Olhovchenkov

unread,
Oct 6, 2016, 10:24:01 AM10/6/16
to Sean Bruno, freebsd-current
On Thu, Oct 06, 2016 at 07:57:57AM -0600, Sean Bruno wrote:

> I'm doing a large amount of change to ixgbe(4) in support of IFLIB
> implementations and running into failures when trying to apply large
> diffs. This is causing phabricator reviews to be unuseable as well.
>
> I've setup two trees to test this. The first tree is used to generate
> the diff and the second (vanilla) is used to apply the diff. The entire
> patch fails to apply, so I'm assuming that the size of the diff is
> failing because of a sanity check or something.

No. This is expanded/collapsed keywords issuse:

===
-******************************************************************************/
-/*$FreeBSD$*/
===

svn diff over repo generate patch w/ collapsed keywords.
At working copy all keywords expanded.
_______________________________________________
freebsd...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

Sean Bruno

unread,
Oct 6, 2016, 10:42:13 AM10/6/16
to Slawa Olhovchenkov, freebsd-current


On 10/06/16 08:23, Slawa Olhovchenkov wrote:
> On Thu, Oct 06, 2016 at 07:57:57AM -0600, Sean Bruno wrote:
>
>> I'm doing a large amount of change to ixgbe(4) in support of IFLIB
>> implementations and running into failures when trying to apply large
>> diffs. This is causing phabricator reviews to be unuseable as well.
>>
>> I've setup two trees to test this. The first tree is used to generate
>> the diff and the second (vanilla) is used to apply the diff. The entire
>> patch fails to apply, so I'm assuming that the size of the diff is
>> failing because of a sanity check or something.
>
> No. This is expanded/collapsed keywords issuse:
>
> ===
> -******************************************************************************/
> -/*$FreeBSD$*/
> ===
>
> svn diff over repo generate patch w/ collapsed keywords.
> At working copy all keywords expanded.
>

Ah, I see. Thank you.

I am regenerating the failed files now. That seems to work (if I leave
the keywords alone).

sean

signature.asc

Alan Somers

unread,
Oct 6, 2016, 11:01:04 AM10/6/16
to Sean Bruno, Slawa Olhovchenkov, freebsd-current
Also, I think the "svn patch" command (as opposed to plain "patch")
can deal with the RCS keywords.

Sean Bruno

unread,
Oct 6, 2016, 11:20:25 AM10/6/16
to Alan Somers, Slawa Olhovchenkov, freebsd-current


On 10/06/16 09:00, Alan Somers wrote:
> On Thu, Oct 6, 2016 at 8:41 AM, Sean Bruno <sbr...@freebsd.org> wrote:
>>
>>
>> On 10/06/16 08:23, Slawa Olhovchenkov wrote:
>>> On Thu, Oct 06, 2016 at 07:57:57AM -0600, Sean Bruno wrote:
>>>
>>>> I'm doing a large amount of change to ixgbe(4) in support of IFLIB
>>>> implementations and running into failures when trying to apply large
>>>> diffs. This is causing phabricator reviews to be unuseable as well.
>>>>
>>>> I've setup two trees to test this. The first tree is used to generate
>>>> the diff and the second (vanilla) is used to apply the diff. The entire
>>>> patch fails to apply, so I'm assuming that the size of the diff is
>>>> failing because of a sanity check or something.
>>>
>>> No. This is expanded/collapsed keywords issuse:
>>>
>>> ===
>>> -******************************************************************************/
>>> -/*$FreeBSD$*/
>>> ===
>>>
>>> svn diff over repo generate patch w/ collapsed keywords.
>>> At working copy all keywords expanded.
>>>
>>
>> Ah, I see. Thank you.
>>
>> I am regenerating the failed files now. That seems to work (if I leave
>> the keywords alone).
>>
>> sean
>>
>
> Also, I think the "svn patch" command (as opposed to plain "patch")
> can deal with the RCS keywords.
>

The use of "svn cp" also seems to generate a lot of failures as well.

I do want to maintain history between certain files when I go to commit.
e.g. svn cp fileA new_fileA, but this seems to confuse the crap out of
diff/patch no matter what I do. This leads to suffering with
phabricator as well.

For now, I'm not going to do the "svn cp" part of my commit, but I will
try and do this when I am ready to shove my work into current.

sean

signature.asc

Sean Bruno

unread,
Oct 6, 2016, 11:23:34 AM10/6/16
to freebsd...@freebsd.org
A good example of what I was trying to do:
svn mkdir sys/modules/ix/ix_iflib
svn cp sys/modules/ix/Makefile sys/modules/ix/ix/ix_iflib/Makefile
<edit sys/modules/ix/ix_iflib/Makefile>

That seems to really confuse things.

sean

signature.asc

Dimitry Andric

unread,
Oct 6, 2016, 12:59:30 PM10/6/16
to Sean Bruno, freebsd...@freebsd.org
On 06 Oct 2016, at 17:23, Sean Bruno <sbr...@freebsd.org> wrote:
>
> On 10/06/16 09:19, Sean Bruno wrote:
>>
>> On 10/06/16 09:00, Alan Somers wrote:
>>> On Thu, Oct 6, 2016 at 8:41 AM, Sean Bruno <sbr...@freebsd.org> wrote:
>>>>
>>>> On 10/06/16 08:23, Slawa Olhovchenkov wrote:
>>>>> On Thu, Oct 06, 2016 at 07:57:57AM -0600, Sean Bruno wrote:
..
> A good example of what I was trying to do:
> svn mkdir sys/modules/ix/ix_iflib
> svn cp sys/modules/ix/Makefile sys/modules/ix/ix/ix_iflib/Makefile
> <edit sys/modules/ix/ix_iflib/Makefile>
>
> That seems to really confuse things.

Try using: svn diff --show-copies-as-adds

-Dimitry

signature.asc

Sean Bruno

unread,
Oct 6, 2016, 5:37:57 PM10/6/16
to Dimitry Andric, freebsd...@freebsd.org


On 10/06/16 10:58, Dimitry Andric wrote:
> On 06 Oct 2016, at 17:23, Sean Bruno <sbr...@freebsd.org> wrote:
>>
>> On 10/06/16 09:19, Sean Bruno wrote:
>>>
>>> On 10/06/16 09:00, Alan Somers wrote:
>>>> On Thu, Oct 6, 2016 at 8:41 AM, Sean Bruno <sbr...@freebsd.org> wrote:
>>>>>
>>>>> On 10/06/16 08:23, Slawa Olhovchenkov wrote:
>>>>>> On Thu, Oct 06, 2016 at 07:57:57AM -0600, Sean Bruno wrote:
> ...
>> A good example of what I was trying to do:
>> svn mkdir sys/modules/ix/ix_iflib
>> svn cp sys/modules/ix/Makefile sys/modules/ix/ix/ix_iflib/Makefile
>> <edit sys/modules/ix/ix_iflib/Makefile>
>>
>> That seems to really confuse things.
>
> Try using: svn diff --show-copies-as-adds
>
> -Dimitry
>

Most of what I was trying to do was with arcanist. The review
generation seemed to be fine, but applying the diff from arcanist seemed
to blow up.

sean

signature.asc
0 new messages