C
C#2y ago
langelescu

How to do a 3 way merge on a file that has been moved after folder structure and refactoring change?

The repo I am working in has been radically refactored. The folder structure has changed and a long with it the subset of files in each folder. Furthermore, namespaces and classes have been renamed, moved, or changed. I am looking at merging the branch that contains this updated version of our source code, e.g. Project/updated back into the original Project/develop and bringing this develop branch up-to-date. Naturally, because life is not easy, several changes due to service packs were added to the original Project/develop branch since the creation of Project/updated so the merge contains files that were not only moved from one location to another but also changed in both branches. So the changes need to be carried forward and integrated into Project/develop. Once the merge has run its first pass, the output shows for a given such file that: 1. File was deleted from the old location [Conflict] 2. File was added to a new location [Staged change] So I need a 3way merge to reconcile these versions and for that I need to see the base version of the file at the point of branching, the current version in Project/develop and the incoming version in Project/updated, I know the base commit but I am not sure how to get access to the base file. I am using `p4merge <base file path> <incoming file.cs> <current file.cs> <final merged file.cs>. How do I get a file for <base file path> given that I know the commit where the base version of the file exists?
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server