Question

I would like to revert only some subfolders (and all their descendants) of my repository to a certain revision. Does anybody know if it is possible to do it with TortoisHg (without having to select each single file)?

Note: I'm using TortoiseHg, version 2.11

Was it helpful?

Solution

You can most easily do this from the manifest window in TortoiseHg.

In TortoiseHg Workbench, select View -> Manifest (Shortcut Alt-3 for me), select the revision you want, and in the manifest window right-click in the folder in question and select Revert to Revision....

You can bring up the manifest tool directly from the command line with:

thg manifest -r REV

Where REV is the revision you want to revert to. But if you're happy using the command line, you can save some time by just doing the following:

hg revert -r REV folder_to_revert

After you've done this, just commit the local changes (the result of reverting files) however you normally do it. If you decide against reverting the files, just do a clean update.

OTHER TIPS

  1. Checkout trunk into a working copy with depth = "Only this item"
  2. Open working copy
  3. Go to repo browser from the working copy
  4. Select your desired project subfolder(s), right-click and select "Update item to revision"

This will pull only the subfolder(s) you've selected into your working copy.

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