Ask Your Question

Rolling back patches

asked 2012-11-27 09:24:26 -0500

KnS gravatar image

updated 2015-01-14 03:05:45 -0500

FrédéricC gravatar image

I was wondering how I would rollback any change I make to the Sage branch by applying patches using


The documentation does not seem to answer this question. I'd appreciate your help.

Come to think of it, I could have taken the Hg Queues route, much simpler to maintain, IMHO. sigh

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2012-11-27 13:58:22 -0500

kcrisman gravatar image

I did this for years. You are right that it's not well documented.

sage: hg_sage.rollback()

will roll back the previous commit, and

sage: hg_sage.revert(options='--all')

will revert the changes of that one commit. Otherwise you'll have to find out what commit to revert to with hg_sage.log() and do

sage: hg_sage.revert?

to see how to use that command. It says it's not what you're looking for, but it is, in a brutish sense.

You're right that queues are easier in the long run, but there is a definite learning curve. The (eventual, not soon) switch to git probably won't make things any easier, just different.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-11-27 09:24:26 -0500

Seen: 73 times

Last updated: Nov 27 '12