2014-03-26 12:54 GMT+01:00 Erik Carstensen <[email protected]>: > 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. >
I agree. Another option is to simply require the patch to be unapplied to start with, but that seems too careful. -- David Kågedal
_______________________________________________ stgit-users mailing list [email protected] https://mail.gna.org/listinfo/stgit-users
