[darcs-users] "Partial" patch application

Vyacheslav Akhmechet coffeemug at gmail.com
Mon Jul 31 16:44:12 UTC 2006

That seems like a pretty big problem. If I'm working on a feature and
then modify something across this feature and something else (change
some log messages throughout my application, for example), in some
cases I won't be able to push that patch. It makes sense that partial
patch application isn't allowed, but at the same time this is a large
useability issue. I'm not sure how much of an issue it  is in practice
once you get used to thinking of patches in terms of "minimal building
blocks" but this particular case shows a logical problem. I have a
patch that is "splittable" but I can't push it. I'd be interested in
hearing whether this was discussed (I am sure it was) and what
solutions were suggested.

On 7/31/06, Tommy Pettersson <ptp at lysator.liu.se> wrote:
> On Mon, Jul 31, 2006 at 10:39:13AM -0400, Vyacheslav Akhmechet wrote:
> > Is there a way to partially apply a patch?
> No. Patches are supposed to be the minimal building blocks
> between repositories. It is not always easy to know in advance
> how small or big a patch should be, and I too have sometimes
> wished for a way to vary the granularity. But I tend to record
> small patches, so I most often want a way to group them
> together, so that several small patches can be "hidden" inside a
> group patch.
> > I have a set of files, say a.txt, b.txt in my production branch. I also
> [...]
> > One obvious solution is to revert and record separate patches so there is no
> > dependency. However, this is complicated in my case. Can I do partial patch
> > application?
> The best think I can think of is to remove c.txt in the
> development branch (with 'darcs remove', that doesn't delete the
> file) and record that as a "temporarily remove c" patch. Then
> add it again and record a "bring c back again" patch. Now you
> can push the troublesome patch plus the remove c patch to the
> production repo, continue to develop c, and later push the bring
> c back patch plus whatever more changes it needs to production
> when it's ready.
> The remove and add file patches will introduce dependencies that
> make may otherwise valid cherry pickings impossible, and I also
> feel a bit worried about what could happen if you later somehow
> get a conflict involving these two patches.
> --
> Tommy Pettersson <ptp at lysator.liu.se>
> _______________________________________________
> darcs-users mailing list
> darcs-users at darcs.net
> http://www.abridgegame.org/mailman/listinfo/darcs-users

More information about the darcs-users mailing list