Normally, Mercurial will abort if I have a dirty working copy when I try to import a patch:
$ hg import x.patch
abort: outstanding uncommitted changes
Is it possible to import it anyway?
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.
With Mercurial 1.9, you can use
hg import --bypassto apply a patch without touching the working copy. The patch will be applied on the working copy parent revision by default. Use the--exactflag to apply the patch onto the changeset mentioned in the patch header instead.