TortoiseHg Apply a Patch

46,002

Solution 1

From Repository Explorer, Repository > Import...

Solution 2

It looks like there is no built-in support in TortoiseHg for this. Try this from a command prompt:

hg import my-patch-file.patch

That should apply the patch to your Mercurial repo and working copy.

First Stab Answer

You should be able to right-click on the patch file and choose "Apply patch..." - that's how it works for other TortoiseX clients. Make sure that you save the patch file to the same directory path it was generated from.

Downloading TortoiseHg 0.8.1 to test...

Solution 3

What may be also noteworthy is, that "Repository Explorer, Synchronize > Import..." (which internally does a "hg import") will automatically do a "commit" - this may not be always wanted behaviour.

Other possibility is to use unix "patch" command (on Windows perhaps use cygwin version) or use "hg import" directly with "--no-commit" option. Both will just make changes in working directory and you may review the changes and commit them later manually.

Solution 4

In 1.0, from Workbench: Repository > Import...

Share:
46,002

Related videos on Youtube

Yousaf
Author by

Yousaf

Senior .Net Software Engineer and Developer and Founder of PlayAlongPiano.com

Updated on September 25, 2020

Comments

  • Yousaf
    Yousaf almost 4 years

    TortoiseHg allows you to email a patch file of your changes to someone, but does it support applying patches?

    If so, how do you apply a patch using TortoiseHg?

  • Yousaf
    Yousaf almost 15 years
    Thanks for the suggestion. I don't see that option.
  • Will Bickford
    Will Bickford almost 15 years
    Yeah I downloaded it and it took me a while to find the "email patch" feature you were referring to. Tinkering...
  • Yousaf
    Yousaf about 14 years
    Good call. As of V1.0 patch importing is part is part of TortoiseHg
  • ivkremer
    ivkremer over 8 years
    Nice. Use --no-commit parameter to avoid a commit.