How does Visual Studio's source control integration work with Perforce?

后端 未结 9 841
轻奢々
轻奢々 2020-12-07 08:18

We\'re using Perforce and Visual Studio. Whenever we create a branch, some projects will not be bound to source control unless we use \"Open from Source Control\", but other

9条回答
  •  佛祖请我去吃肉
    2020-12-07 08:41

    Support for renaming a file or moving it to a new folder directory is terrible and painful if using the Visual Studio P4 plug-in integration. No built-in feature exists that alerts P4 to renaming the file or that it has been moved.

    The issue is that renaming a file requires not just updating the associated VS project file but Perforce needs to be informed as well of the change if you want to maintain proper revision history.

    Currently, I do not see a way to do both in a single operation if using the VS integration. Instead, you have to:

    1. rename/move the file from within the Perforce client
    2. delete the old filename reference in the project file within VS
    3. add the new filename reference in the project file within VS
    4. submit your changes

    If you use a continuous integration build process and you submit changes at any point prior to the last step, you are guaranteed to have a broken build.

    The problem magnifies significantly the more files that require renaming or moving. This is not a smooth process whatsoever.

提交回复
热议问题