On Mon, May 12, 2008 at 8:05 PM, Gwern Branwen <[EMAIL PROTECTED]> wrote: > So an unhappy comment showed up on Reddit recently: > <http://reddit.com/info/6j1ao/comments/c03zfnz>. > > The author's plaint is that appends to a file are treated as dependent on > the previous appends, so in a file 'a\nb\nc\nd', anything that removes 'b' > wipes out c and d. (Which I find a reasonable concern, since I manage a > personal file, .ztypos, which is appended to over time, and I'm bothered that > I can't go back and selectively erase anything but the last one).
The problem is that when you've got successive appends to a file, each append does depend on the previous appends. If you make change echo foo >> file && darcs record -a -m foo and then I pull. And then you make the change echo bar >> file && darcs record -a -m bar then you were to obliterate foo, while leaving bar present using darcs obliterate -p foo -a then what would happen when I pull patch bar from you? I'd have a conflict, because your new bar patch (after obliterating foo) modifies the same line that the foo patch modifies. So yes, patch bar depends on patch foo in this case. We could introduce an amend-record-obliterate variant that obliterates patches that are depended upon by other patches and amend-records those other patches, but I'm not sure how common the situation is where you want to obliterate one change and amend another at the same time. Maybe it's a common use-pattern? David _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
