Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6110563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:31:49+00:00 2026-05-23T14:31:49+00:00

I have successfully imported patches without having conflicting changes. But when I try to

  • 0

I have successfully imported patches without having conflicting changes. But when I try to import patch with conflicting changes it throws an error saying “Hunk #1 FAILED at 11.. “. There is no option to merge changes. Is there any other way to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:31:50+00:00Added an answer on May 23, 2026 at 2:31 pm

    Manual resolution

    The latest versions of TortoiseHg 2.1 have tools for helping you resolve rejected chunks from patches. When you apply a patch and it has rejections, for each file with rejections it asks if you want to resolve rejected chunks. If you click Yes, it shows you a screen with the content of the file (with successful chunks applied) as well as each chunk that was rejected, to allow you to manually do the changes a little easier and mark each as resolved.

    Achieving 3-Way Merge

    The way that I sometimes handle large rejections is to rebase the patch. In TortoiseHg 1.x I could select one node, right-click on another and actually rebase patches. In TortoiseHg 2.x they have not yet added that back in, but the workaround isn’t so bad. You can still rebase patches on the commandline using hg rebase. In either case, you need the mq and rebase extensions enabled (and you probably already have the former enabled). This answer is not a place for teaching how to use mq or rebase (there are plenty of other answers and articles that do that), so I will be assuming some familiarity with them.

    In both, you will need to apply the patch to the revision on which it was based (or to one where it applies cleanly or close to clean).

    Commandline:

    1. Run hg rebase -s patchRev -d tip. Along with whatever other switches you want on the rebase command.

      This will bring up your 3-way merge tool to resolve conflicts, for each file.

    2. Run hg qrefresh to make sure the merge results are updated into the patch.

    TortoiseHg UI

    1. Finish the patch as a normal changeset.
    2. Rebase that changeset onto the tip:
      • Update to the tip. This is important as it used to set the target of the rebase operation.
      • Right-click on the temporary changeset and select Rebase to bring up the Rebase dialog.
      • Review that source and destination are correct, and click Continue. If there are merge conflicts, click on the resolved link that appears to open the Resolve dialog.
      • Click Mercurial Resolve to let Mercurial try to automatically resolve some conflicts.
      • For anything else that remains use Tool Resolve to bring up 3-way merge for selected files.
      • Once all are resolved, click Close on the Resolve dialog.
      • Click Continue and then Close on the Rebase dialog.
    3. Right-click on the temporary changeset now at the tip and go to Modify History > Import to MQ. Now it is a patch again.

    I prefer the latter method for the more troublesome instances because it by default prevents Mercurial from automatically resolving conflicts. It allows me to choose the order in which I resolve files and how I resolve them, showing the status of my progress with each step.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used zohmg and successfully created mapper, table in HBase and test-imported my
I have successfully hosted my mvc website on server. But I'm not able to
I have successfully imported ActionbarSherlock library to my own project, and I can already
**I have added the Twitter.framework and Accounts.framework. And imported the Twitter.h header file. But
I have PKCS#12 keystore that I've sucessfully imported in my browser for accessing a
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I have successfully managed to get System.Speech.Synthesis to read English text in arbitrary voices
I have successfully implemented interop beftween Win32 application and managed .Net dll as described
I have successfully upgraded an MFC application which was compiled with an old version
I have successfully used the Excel and Word addin templates in Visual studio 2008

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.