On Sat, Jan 16, 2010 at 15:05:22 -0500, Isaac Dupree wrote: > ...so this is how it works: ? It's basically just like how I would > go and manually edit the file in between darcs-records, except > possibly less of a nuisance.
That's a good way of putting it. It is indeed a useful insight that you should be thinking of each section as a different version of the file, and not the patch. One key point, however, is that hunk editor has no effect on your working directory. This comes thanks to the principle that the patch sequence that results from hunk editing is equivalent to the original patch. This is also why the initial and final states of the file will always be those from your original patch, or rather why the hunk editor will dis-regard any attempts to modify those states. > (So, not intrisically intuitive or > quick, but something I've learned to do already that lets me control > my darcs-patches.) Does it allow to split into more than this > number of patches? No and yes. No you cannot add new separators (yet). For now, if you want to split it into multiple patches, you're best off using the hunk editor multiple times: split h0 into h0' + h1 split h1 into h1' + h2, etc Yes, indirectly, in that because you are really (in effect) editing some intermediate representation of a file, if you happen to separate some stuff out with blank lines, Darcs will propose each of these paragraphs separately. That's not because of the hunk editor; it's just what Darcs naturally does when you record patches anyway. > (basically, can you add new "===" lines for more > sections in between?) > I vote "yes" on the last question, if I'm understanding correctly. > In fact, couldn't it start out as simply, It depends on what you're asking for! If you really do accept that each section represents different versions of the file being edited, then we could do this in principle. The cost is that the sections would contain a bit of duplicate information. Suppose you wanted to split this hunk into its 4 constituent modifications: -a +a2 +b2 +c2 How this would work in your proposal is something like this: JUST A SINGLE PASS: === REFERENCE OLD STATE, do not edit --v ======== a === PATCH here between this state --^ and that state --v == === PATCH here between this state --^ and that state --v == a2 === PATCH here between this state --^ and that state --v == a2 b2 === PATCH here between this state --^ and that state --v == a2 b2 c2 === (REFERENCE NEW STATE ABOVE, do not edit --^ Note the duplication above... In the current proposal, it would be similar, but you'd just be making three (?) passes with the hunk editor. > Of course this would take some explaining that we'd have to figure > out -- especially to newbies. But, tell me, have *I* gotten the > idea correctly? I *think* you've got it :-), and I certainly like that we're moving in the direction of not trying to number the intermediate patches... -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9
pgprcgN8h9ZJp.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
