patch splitting util(s)?
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 `-------------------------------------------------
Quoted 2 lines · Eli Carter
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
Quoted 7 lines · Dave Jones
Quoted 2 lines · Eli Carter
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 `-------------------------------------------------
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines
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
Quoted 10 lines · Pete Zaitcev
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
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?
Quoted 5 lines
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 `-------------------------------------------------
On Mon, 14 Apr 2003 20:47:33 -0400 Pete Zaitcev <[email protected]> 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
Quoted 18 lines
Date: Tue, 15 Apr 2003 13:10:43 -0700
From: "Randy.Dunlap" <[email protected]>| > 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.
Quoted 1 line
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
Quoted 13 lines · Pete Zaitcev
Quoted 13 lines
Date: Tue, 15 Apr 2003 13:10:43 -0700
From: "Randy.Dunlap" <[email protected]>| > 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.
Quoted 5 lines
Quoted 1 line
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 `-------------------------------------------------