Splitting diff hunks in ‘shelve’

Ben Finney ben+bazaar at benfinney.id.au
Thu Sep 24 01:19:54 BST 2009


Howdy all,

I love the ‘shelve’ operation [0], and it's a delight to be able to
decide post-hoc that I've been working on what should be distinct
commits.

One thing I'd love to see, though, is to be able to split a diff hunk
that has entangled what I consider to be two or more separate changes,
and be able to answer differently for each one.

Emacs can do this in its ‘diff’ mode, with ‘diff-split-hunk’; but that
relies on the fact that Emacs can use the current cursor point as input
for *where* to split the hunk. I don't know what the equivalent would be
in Bazaar's ‘shelve’ interaction.

Has this idea been worked on before? With what results?


[0] I'm so accustomed to ‘shelve’ that I forget to evangelise it, and
    don't see it discussed much, with the often-amusing result that Git
    and Darcs users are often unaware of it and think they have a
    knock-down zinger with their much more well-known equivalent
    features. I've even seen many raise their eyebrows at the notion
    that ‘shelve’ it's even *more* useful than the default operation of
    Darcs or Git, since (like Git's ‘stash’) it stays out of your way
    until you ask for it.

-- 
 \       “If you see an animal and you can't tell if it's a skunk or a |
  `\   cat, here's a good saying to help: ‘Black and white, stinks all |
_o__)              right. Tabby-colored, likes a fella.’” —Jack Handey |
Ben Finney




More information about the bazaar mailing list