On 01/13/11 08:42, Eric Kow wrote:
On Wed, Jan 12, 2011 at 15:49:31 -0500, Isaac Dupree wrote:
What if "pull" could (maybe given a flag that you'd use with your
upstream) re-order all patches from upstream, new or old, as far
back in your history as possible?

I'm always nervous about introducing new flags [1], but I like
Isaac's variant of Alexander's idea:

The hypothetical

   darcs pull --reorder

would then pull all patches in such a way that the ones which are
local to the current repo go on top.

I'm nervous about it too.  What if you mix uses with and without --reorder?

Does --reorder always move all patches found in the remote repo to the bottom? Even the older ones that were, of course, already in the local repo? (And never reorder these patches with each other? Or perhaps it should reorder them to match the remote repo's order? Is that always possible if we have them adjacent, consistent, but in a different order?)

What about patches that originated in the local repo, but were eventually pulled into the remote repo -- will the user be confused that they're no longer kept on top?

Should reordering against another repo be an operation separable from pulling, since you can do it usefully without pulling any patches?

What about a user who habitually pulls from two different repos, not just one* -- the behavior is probably clear enough, just might be surprising.

*(say, a HEAD and a long-term branch, and pushes to the long-term branch after successfully merging the two or adding features. There's probably an even more symmetric local workflow too: I'm working on a little Haskell game/simulation toy and I sometimes have a branch to hack on the backend model and a branch to hack on the fancy user interface and sometimes and another branch where I pull both changes and see if they work together, not just separately. Workflows similar to that anyway.)

Is the behavior even possible to implement? Can it be implemented in faster than O(n) in all patches in the history?

-Isaac
_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to