Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues replicating changed and moved files from other branches #10

Open
swc-jesse opened this issue Oct 20, 2021 · 0 comments
Open

Issues replicating changed and moved files from other branches #10

swc-jesse opened this issue Oct 20, 2021 · 0 comments

Comments

@swc-jesse
Copy link

swc-jesse commented Oct 20, 2021

I'm hitting a lot of errors like

//Foo/Foo/Bar.cpp - moved from //Foo/Bar.cpp but has no matching resolve record; must 'add -d' or 'move' to correct.

The common case in all of them is that the files are moved, edited and integrated in other branches prior to being merged into the current branch as a combined move / edit. This seems to really confuse things. My bat file solution for each file is to:

:: 1. Revert the offending file which will delete it and revert the moved file, bringing it back
p4 -p %target_port% -u %target_user% -c %target_client% revert %moved_file%

:: 2. Edit the original file
p4 -p %target_port% -u %target_user% -c %target_client% edit %deleted_file%

:: 3. Move the original file
p4 -p %target_port% -u %target_user% -c %target_client% move %deleted_file% %moved_file%

:: 4. Force sync the new file
p4 -p %source_port% -u %source_user% -c %source_client% sync -f %moved_file%@%source_change%

I'm pretty sure this is not the correct fix, since it loses the integration history in the present changelist - but I haven't found another way around these errors and they are quite numerous in some cases.

Here's a screenshot of a problematic "move / edit" (highlighted). In this case the file was populated and edited in the working branch (bottom yellow revision) moved in another branch and edited in various other branches, eventually merged back to the working branch new location (top yellow line) as one operation.

image

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant