Ask Your Question
2

Rolling back patches

asked 2012-11-27 16:24:26 +0100

KnS gravatar image

updated 2015-01-14 10:05:45 +0100

FrédéricC gravatar image

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

hg_sage.apply("<path-and-name-to-the-patch>")

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
2

answered 2012-11-27 20:58:22 +0100

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

Stats

Asked: 2012-11-27 16:24:26 +0100

Seen: 448 times

Last updated: Nov 27 '12