Question

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?

Solution Thanks @Will Bickford for your help. I just found this feature listed as a TODO on the TortoiseHg site.

Was it helpful?

Solution

From Repository Explorer, Repository > Import...

OTHER TIPS

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...

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.

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

Tortoise Hg has documentation on creating and applying (importing) patches:

http://tortoisehg.bitbucket.io/manual/1.0/patches.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top