Both hg revert and hg backout revert changes made by a former revision. What is the difference between the two?
Both hg revert and hg backout revert changes made by a former revision. What
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Given the history of changesets:
hg revert -r B: Stay at current revision, but update the working directoryas of revision
B. It has the effect of a patch that revokes the changesof
C,DandE.hg backout -r C: Update the working directory so that it contains the mergeof revision C’s parent (
B) and the current revision, preserving the changesmade in between the two revisions (working dir still contains changes of
revision
DandE). This has the effect of a patch applied onE,undoing the changes of only
C.You may want to edit some files if not all of
Cwas bad. Remember to doa
hg commitin any case: