[darcs-users] darcs cannot apply some patch bundles

Owen Stephens darcs at owenstephens.co.uk
Tue Mar 6 20:53:17 UTC 2012


On 06/03/12 at 06:24pm, Ganesh Sittampalam wrote:
> On 06/03/2012 15:12, Michael Hendricks wrote:
> > When generating a patch bundle, it seems that minimal context is more
> > aggressive than we need.  A "reduced context" might be sufficient.  I
> > imagine just commuting F backwards until it fails to commute or it
> > reaches a tag.  That would be O(n) and probably removes most patches
> > that are obviously not relevant to the context.
>
> Yes, I agree it would be fine just to consider some subset of patches
> for this use case using whatever heuristic, and I think that e.g. 100
> patches would be absolutely fine. The only difficulty is picking a
> heuristic that won't cause fresh confusion when it doesn't work out.
Warning: Thinking out loud!

I wonder if a useful user-provided flag would be:

  darcs send --reduce-context-to 'date: -5 days'

or

  darcs send --reduce-context-to 'patch: my-patch-I-think-you-have'

which would attempt to remove the patches since a given date or patch (or
other
matcher), failing if it wasn't possible (perhaps just a warning?), or if a
tag
was encountered first.

I guess the obvious flaw is that it'd be quite easy to forget the flag when
sending, rendering the whole thing pointless. Maybe an interactive prompt
would
be better?

Having proposed it, I'm not sure I like the idea much though - it feels like
the sort of thing that a user might question with "Why do I have to pick an
arbitrary point in history? Why isn't Darcs doing this for me?".

-- 
Owen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20120306/6a3eee8b/attachment.html>


More information about the darcs-users mailing list