merge branches: rename file and then modify it
Moderator: SourceGear
merge branches: rename file and then modify it
I have been using the merge branches feature after I have made a change to a file in the branch. The change I have made has been to rename the file, and then I modified the renamed file. When I go to "merge branches", it detects that the file has been renamed, but since it cannot file the modified (renamed) file in the target, it says that the modification is not applied since the target cannot be found. But, in the end, it appears that the changes made to the modified file after renaming do get carried over after the "merge branches" completes. I believe the same thing happened when I modified a file I had moved on a branch.
Just adding a bit more information. This is running Vault 3.0.1. Also, I was not correct in saying that the renamed-then-modified file was correctly getting merge from the origin to the target branch -- it is not. Only the rename part of the operation is getting merged; the modify part is not. I have to perform the "merge branch" operation a second time in order for it to pick up the modified (after rename) file.
It is certainly possible that within a branch, people may rename/move a file and then further modify it. Furthermore, they may modify it before the rename/move, and then further modify it. Or they may rename/move it several times. If this is a limitation of "merge branches", then what is the approach to take when there are more than one rename/move/modify on the same file? Is it to keep executing "merge branches" until you get everything resolved?
I agree with you -- merge branches should take all this into account. It's just not clear whether the behavior you are seeing is intended, or a bug.
I'll try to reproduce this in-house. Just to be clear on the steps -- you branched a folder, renamed the file, then modified the file, then merged back into the original folder. Anything else that might be relevant to reproducing this?
I'll try to reproduce this in-house. Just to be clear on the steps -- you branched a folder, renamed the file, then modified the file, then merged back into the original folder. Anything else that might be relevant to reproducing this?
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Vault Merge Branches does renames first, then modifications.
I did get the error about not finding the renamed file, but when I doubleclicked the error, the tree view opened with the option to select another file. I selected the renamed file and after the wizard was done, the modified renamed file was in the pending change set, where a Commit updated the file in the target folder. So there is an extra step, but you shouldn't have to run mergebranches twice.
I don't think there's an easy way to change this in the Wizard at this point.
I did get the error about not finding the renamed file, but when I doubleclicked the error, the tree view opened with the option to select another file. I selected the renamed file and after the wizard was done, the modified renamed file was in the pending change set, where a Commit updated the file in the target folder. So there is an extra step, but you shouldn't have to run mergebranches twice.
I don't think there's an easy way to change this in the Wizard at this point.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager