On Wed, Mar 26, 2014 at 5:53 AM, Karl Wiberg <[email protected]> wrote:


>      I'm not convinced that "stg pick" is the right place to put
>      this---at least in my ears, "pick" clearly means grabbing
>      something and bringing it *to oneself*. But I can't think of a
>      better home for it either ("stg dup" or "stg copy"?).
>

How about making it delete the local patch, and rename it to 'stg move'?

synopsis:
stg move PATCH BRANCH
moves PATCH to remote branch BRANCH
-b BRANCH: move from BRANCH instead of current branch (will not be
implemented initially)
--unapplied: keep patch unapplied in remote branch

The command would do the following:
1. if PATCH is applied in source branch, pop it
2. create PATCH unapplied on dest branch
3. delete PATCH in source branch
4. push PATCH on dest branch, unless --unapplied

(1) and (4) may cause merge conflicts, while 2 and 3 will always succeed.
As usual there is a choice between doing a full rollback on failure, or
leaving the tree in some intermediate state. Some options:
a: rollback everything if anything fails
b. if (1) fails, end up in the intermediate state 'stg pop' would give; if
4 fails, just roll back 4.
c. if (1) fails, roll back everything; if 4 fails, just roll back 4

I think I like (c) best, because it does what you probably wanted. (a) is
OK too, if the message can hint about --unapplied. I don't like (b),
because it makes me lose the stack top.
_______________________________________________
stgit-users mailing list
[email protected]
https://mail.gna.org/listinfo/stgit-users

Reply via email to