linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [OT] patch splitting util(s)?
@ 2003-04-14 21:46 Eli Carter
  2003-04-14 21:51 ` Dave Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Carter @ 2003-04-14 21:46 UTC (permalink / raw)
  To: LKML

A bit off-topic, but something tangentally related to this list...

Is anyone aware of a utility that helps with splitting a (large) patch 
into multiple patches at a hunk (or better, a sub-hunk) level?

I'm visualizing a GUI (or similar) that lets you right-click on a hunk 
and get a list of sub-patches or the option to create a new sub-patch, 
and moves the hunk to the selected sub-patch.  (I use the term 
'sub-patch', but in theory, you could load a set of patches, then 
shuffle hunks around.)  And lets you go to the sub-patches and move 
hunks from there to another patch.

A vim or emacs script/plugin would probably make the most sense.  (I'm a 
vim user, so I'm not familiar with what emacs provides, but I didn't see 
this functionality after a very quick look.)

I didn't have much luck with googling.  I think the words I used are too 
generic.  :/

Anyone know of something like this?

TIA,

Eli
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
  2003-04-14 21:46 [OT] patch splitting util(s)? Eli Carter
@ 2003-04-14 21:51 ` Dave Jones
  2003-04-14 22:26   ` Eli Carter
       [not found]   ` <mailman.1050360781.7083.linux-kernel2news@redhat.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Dave Jones @ 2003-04-14 21:51 UTC (permalink / raw)
  To: Eli Carter; +Cc: LKML

On Mon, Apr 14, 2003 at 04:46:32PM -0500, Eli Carter wrote:

 > I didn't have much luck with googling.  I think the words I used are too 
 > generic.  :/
 
Google for diffsplit. Its part of Tim Waugh's patchutils.
Patchutils should be part of pretty much every distro these days too.

		Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
  2003-04-14 21:51 ` Dave Jones
@ 2003-04-14 22:26   ` Eli Carter
       [not found]   ` <mailman.1050360781.7083.linux-kernel2news@redhat.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Carter @ 2003-04-14 22:26 UTC (permalink / raw)
  To: Dave Jones; +Cc: LKML

Dave Jones wrote:
> On Mon, Apr 14, 2003 at 04:46:32PM -0500, Eli Carter wrote:
> 
>  > I didn't have much luck with googling.  I think the words I used are too 
>  > generic.  :/
>  
> Google for diffsplit. Its part of Tim Waugh's patchutils.
> Patchutils should be part of pretty much every distro these days too.

I'm aware of patchutils.  (Check the 0.2.22 Changelog ;) )  However, 
splitdiff doesn't do what I'm after, from my initial look.  Though now 
that I think about it, it suggests an alternative solution.  A 
'shatterdiff' that created one diff file per hunk in a patch would give 
me basically what I want.  I could then use directories and 'mv' to sort 
out the parts.  Repetative calls to 'combinediff' would suffice for 
cleaning up the ensuing mess, I think.  Hmm...  That would get me to the 
hunk level, but not the sub-hunk, though editdiff/rediff might help there.

Thanks,

Eli
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
       [not found]   ` <mailman.1050360781.7083.linux-kernel2news@redhat.com>
@ 2003-04-15  0:47     ` Pete Zaitcev
  2003-04-15 15:22       ` Eli Carter
  2003-04-15 20:10       ` Randy.Dunlap
  0 siblings, 2 replies; 8+ messages in thread
From: Pete Zaitcev @ 2003-04-15  0:47 UTC (permalink / raw)
  To: Eli Carter; +Cc: linux-kernel

>>  > I didn't have much luck with googling.  I think the words I used are too 
>>  > generic.  :/
>>  
>> Google for diffsplit. Its part of Tim Waugh's patchutils.
>> Patchutils should be part of pretty much every distro these days too.
> 
> I'm aware of patchutils.  (Check the 0.2.22 Changelog ;) )  However, 
> splitdiff doesn't do what I'm after, from my initial look.  Though now 
> that I think about it, it suggests an alternative solution.  A 
> 'shatterdiff' that created one diff file per hunk in a patch would give 
> me basically what I want.

I moaned at Tim until he caved in and added an '-s' option
couple of weeks ago. It should be in a fresh rawhide srpm.

Mind, you can do what you want even now, with -n (for line numbers)
and a little bit of sh or perl, but all concievable solutions
require several passes over the diff, which gets tiresome
if you diff 2.4.9 (RH 7.2) and 2.4.18 (RH 8.0). The -s option
does it in one pass.

-- Pete

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
  2003-04-15  0:47     ` Pete Zaitcev
@ 2003-04-15 15:22       ` Eli Carter
  2003-04-15 20:10       ` Randy.Dunlap
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Carter @ 2003-04-15 15:22 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: linux-kernel

Pete Zaitcev wrote:
>>> > I didn't have much luck with googling.  I think the words I used are too 
>>> > generic.  :/
>>> 
>>>Google for diffsplit. Its part of Tim Waugh's patchutils.
>>>Patchutils should be part of pretty much every distro these days too.
>>
>>I'm aware of patchutils.  (Check the 0.2.22 Changelog ;) )  However, 
>>splitdiff doesn't do what I'm after, from my initial look.  Though now 
>>that I think about it, it suggests an alternative solution.  A 
>>'shatterdiff' that created one diff file per hunk in a patch would give 
>>me basically what I want.
> 
> 
> I moaned at Tim until he caved in and added an '-s' option
> couple of weeks ago. It should be in a fresh rawhide srpm.

I'm not finding a -s option in Tim's 0.2.23pre1 release.  Where should I 
be looking for it?

> Mind, you can do what you want even now, with -n (for line numbers)
> and a little bit of sh or perl, but all concievable solutions
> require several passes over the diff, which gets tiresome
> if you diff 2.4.9 (RH 7.2) and 2.4.18 (RH 8.0). The -s option
> does it in one pass.

Thanks,

Eli
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
  2003-04-15  0:47     ` Pete Zaitcev
  2003-04-15 15:22       ` Eli Carter
@ 2003-04-15 20:10       ` Randy.Dunlap
  2003-04-24 20:45         ` Pete Zaitcev
  1 sibling, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2003-04-15 20:10 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: eli.carter, linux-kernel

On Mon, 14 Apr 2003 20:47:33 -0400 Pete Zaitcev <zaitcev@redhat.com> wrote:

| >>  > I didn't have much luck with googling.  I think the words I used are too 
| >>  > generic.  :/
| >>  
| >> Google for diffsplit. Its part of Tim Waugh's patchutils.
| >> Patchutils should be part of pretty much every distro these days too.
| > 
| > I'm aware of patchutils.  (Check the 0.2.22 Changelog ;) )  However, 
| > splitdiff doesn't do what I'm after, from my initial look.  Though now 
| > that I think about it, it suggests an alternative solution.  A 
| > 'shatterdiff' that created one diff file per hunk in a patch would give 
| > me basically what I want.
| 
| I moaned at Tim until he caved in and added an '-s' option
| couple of weeks ago. It should be in a fresh rawhide srpm.
| 
| Mind, you can do what you want even now, with -n (for line numbers)
| and a little bit of sh or perl, but all concievable solutions
| require several passes over the diff, which gets tiresome
| if you diff 2.4.9 (RH 7.2) and 2.4.18 (RH 8.0). The -s option
| does it in one pass.

so when does this change show up at http://cyberelk.net/tim/patchutils/ ?

--
~Randy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
  2003-04-15 20:10       ` Randy.Dunlap
@ 2003-04-24 20:45         ` Pete Zaitcev
  2003-04-24 22:05           ` Eli Carter
  0 siblings, 1 reply; 8+ messages in thread
From: Pete Zaitcev @ 2003-04-24 20:45 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Pete Zaitcev, eli.carter, linux-kernel

> Date: Tue, 15 Apr 2003 13:10:43 -0700
> From: "Randy.Dunlap" <rddunlap@osdl.org>

> | > I'm aware of patchutils.  (Check the 0.2.22 Changelog ;) )  However, 
> | > splitdiff doesn't do what I'm after, from my initial look.  Though now 
> | > that I think about it, it suggests an alternative solution.  A 
> | > 'shatterdiff' that created one diff file per hunk in a patch would give 
> | > me basically what I want.
> | 
> | I moaned at Tim until he caved in and added an '-s' option
> | couple of weeks ago. It should be in a fresh rawhide srpm.
> | 
> | Mind, you can do what you want even now, with -n (for line numbers)
> | and a little bit of sh or perl, but all concievable solutions
> | require several passes over the diff, which gets tiresome
> | if you diff 2.4.9 (RH 7.2) and 2.4.18 (RH 8.0). The -s option
> | does it in one pass.
> 
> so when does this change show up at http://cyberelk.net/tim/patchutils/ ?

Tim pointed out that the option is -a, not -s. It should be
present in 0.2.22.

-- Pete

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT] patch splitting util(s)?
  2003-04-24 20:45         ` Pete Zaitcev
@ 2003-04-24 22:05           ` Eli Carter
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Carter @ 2003-04-24 22:05 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Randy.Dunlap, linux-kernel

Pete Zaitcev wrote:
>>Date: Tue, 15 Apr 2003 13:10:43 -0700
>>From: "Randy.Dunlap" <rddunlap@osdl.org>
> 
> 
>>| > I'm aware of patchutils.  (Check the 0.2.22 Changelog ;) )  However, 
>>| > splitdiff doesn't do what I'm after, from my initial look.  Though now 
>>| > that I think about it, it suggests an alternative solution.  A 
>>| > 'shatterdiff' that created one diff file per hunk in a patch would give 
>>| > me basically what I want.
>>| 
>>| I moaned at Tim until he caved in and added an '-s' option
>>| couple of weeks ago. It should be in a fresh rawhide srpm.
>>| 
>>| Mind, you can do what you want even now, with -n (for line numbers)
>>| and a little bit of sh or perl, but all concievable solutions
>>| require several passes over the diff, which gets tiresome
>>| if you diff 2.4.9 (RH 7.2) and 2.4.18 (RH 8.0). The -s option
>>| does it in one pass.
>>
>>so when does this change show up at http://cyberelk.net/tim/patchutils/ ?
> 
> 
> Tim pointed out that the option is -a, not -s. It should be
> present in 0.2.22.

Almost.  That does a per-file split, not a per-hunk split.  And per-hunk 
I have found makes splitting patches into their logical components 
_much_ easier.

Thanks for the clarification though!

Eli
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-04-24 21:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-14 21:46 [OT] patch splitting util(s)? Eli Carter
2003-04-14 21:51 ` Dave Jones
2003-04-14 22:26   ` Eli Carter
     [not found]   ` <mailman.1050360781.7083.linux-kernel2news@redhat.com>
2003-04-15  0:47     ` Pete Zaitcev
2003-04-15 15:22       ` Eli Carter
2003-04-15 20:10       ` Randy.Dunlap
2003-04-24 20:45         ` Pete Zaitcev
2003-04-24 22:05           ` Eli Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).