Svn Merging Dev/Prod with TortoiseSVN
For some of my professional projects I don't get to choose the environment and when that happens I'm forced to learn or re-learn in this case certain tools/technologies. I can't take complete credit for this article as it was mostly written by a previous co-worker however nothing here is secretive and it shouldn't be; since none of it is proprietary.
Merging from Trunk to Branch
After making any change in trunk, immediately merge those changes to the branch, Make sure your working copy of your branch has no un-commited changes. Open command prompt and change into tortise bin folder.
Merging from Trunk to Branch
After making any change in trunk, immediately merge those changes to the branch, Make sure your working copy of your branch has no un-commited changes. Open command prompt and change into tortise bin folder.
- Usually: c:\Program Files\TortoiseSVN\bin\
- Update your branch working copy with the following command:
- TortoiseProc.exe /command:update /path:C:\Development\YOURPROJECT
- Replace the path parameter with the actual path to your branch working copy
- Run the following command:
- TortoiseProc.exe /command:merge /fromurl:https://subversion.com/YOURPROJECT
- The following screen will appear. Leave the defaults selected as shown, and click next.
- On the next screen, leave the defaults and click Test Merge.
- Ensure the results look as expected.
- Click merge
- COMMIT THE MERGE using the following command:
- TortoiseProc.exe /command:commit /path:C:\Development\YOURPROJECT
- If you want to be sure it was successful, repeat steps 1-4. The “Test merge” should show nothing to do.
Merging from Branch to Trunk
First you must follow the steps above to update the branch from the trunk!
First you must follow the steps above to update the branch from the trunk!
- Even if there is nothing new in trunk, this must be done so subversion will record the revisions to be able to do the reintegration successfully
- Make sure your working copy of your trunk has no un-commited changes
- Update your trunk working copy with the following command:
TortoiseProc.exe /command:update /path:C:\Development\YOURPROJECT
Replace the path parameter with the actual path to your trunk working copy - Open command prompt and run the following command:
TortoiseProc.exe /command:merge /fromurl:https://subversion.com/YOURPROJECT /path:C:\Development\YOURPROJECT - On the next screen, leave the defaults and click Test Merge
- Ensure the results look as expected.
- Click merge
- COMMIT THE MERGE using the following command:
TortoiseProc.exe /command:commit /path:C:\Development\YOURPROJECT - If you want to be sure it was successful, repeat steps 1-4. The “Test merge” should show nothing to do.