lkml.org 
[lkml]   [2007]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: avoiding rejects
Andrew Morton wrote:
>
> Most of these lists are unordered anyway, so inserting the new item at a
> randomly-chosen position is a better approach than just appending it.
> -
But you have lost the order you have just stated.
"Order by time of addition" ascending ;)

Sometimes what I do is a diff with only post sync lines.
With -p and the end of the list it mostly works.

consider this file
<list1>
BEGIN LIST
I1
I2
I3
END LIST
..
...
</list1>

and consider this patch

<list2.patch>
--- list1 2007-07-11 10:33:26.000000000 +0300
+++ list2 2007-07-11 10:22:16.000000000 +0300
@@ -5,2 +5,3 @@ BEGIN LIST
+ add1
END LIST
..
</list2.patch>
Now this will work. In fact you can apply this patch
multiple times and it will keep adding Items. "patch"
will not warn about reverse patching, but ...
It will add Items from the top. Actually it will add
the Item at an absolute line in the file. At -# line
stated at hunk header, like "-5" above.

Free Life
Boaz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-11 11:09    [W:0.266 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site