[darcs-devel] darcs patch: Amending a patch doesn't remove explicit dependencies

Tommy Pettersson ptp at lysator.liu.se
Mon Nov 20 11:45:45 PST 2006


On Sat, Nov 18, 2006 at 05:48:05PM +0100, Eric Y. Kow wrote:
> Another way might be just to replace infopatch by infodepspatch (perhaps
> using infopatch as a name).  Infopatch doesn't seem to be used in many
> places, and perhaps being explicit about your deps (you know you're
> passing [] in) is a good idea.

I would have agreed, but I took a quick look on the code Sunday,
pondering about implementing --ask-deps, --edit-long-comment,
&c, for Amend-record, and I think adding deps in the infopatch
function call is not going to work well. It is fine only for the
special case of cloning them, but if the user is to say Y and N,
the ask-deps dialogue needs the new patch beforehand (without
dependencies) to exclude all implicit dependencies. So in the
general case you shouldn't add any dependencies until later,
after the infopatch call. Or well, an infodepspatch version of
the function could of course be called twice, first with [] and
later with the new deps. But for now I'll personally consider
the adddeps variant easier to understand.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-devel mailing list