How to integrate a branch back to trunk when files in the trunk have been moved or renamed while files in the branch have been changed?
The question Integrating moved files in perforce explains similar issue in reverse order, i.e. integrating trunk into branch where files have been moved. However, the answer does not help.
I am unable to use p4 integrate -3 in my scenario, and perforce always asks to specify -D or -Dt flag, which if specified, always creates new files instead of merging them into the existing moved files. Note that I am using latest Perforce client 2014.1.
If at all possible I'd recommend upgrading your server; I'm inferring from the fact that you're unable to use "p4 integrate -3" that you're on a fairly old release. With the latest server release the "integrate -3" functionality is enabled by default, without having to use an extra flag or anything, per this blog post:
http://www.perforce.com/blog/130806/quality-life-improvements-renamed-files
Having this functionality is a pretty big deal since it makes the scenario you describe "just work" -- all you have to do is integrate and resolve as normal.
Without that functionality, you have to do some work -- either modify a branchspec to line the current versions of the files up and use that to integrate the content, or manually recreate the same rename operations in the branch so that the files line up normally.
Note that this functionality requires a new server in addition to a new client, so a 2014.1 client on its own (with an old server) won't do the trick -- a server upgrade is necessary. If you're on an old release you'll need to do a restore from checkpoint as part of the upgrade, per the instructions in the administrator's guide:
http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.install.html#d0e1167
but I would recommend you don't let that deter you; you'll be getting a lot of improvements. :)
Related
I have a situation where my depot is saying it has the latest version of a bunch of different files but my local workspace actually has newer revisions. My tools (P4V and VS plugin) are incorrectly telling me that everything is up-to-date.
I can prove this is the case because if I check out the file, make no changes, and submit, the changes are committed and the history appears correct and get latest operations on other machines pull the correct version of the file.
This isn't really a viable solution as there could be many files that require this fix and I have no way of knowing I have fixed them all.
I believe the issue has come about due to occasionally working offline and (incorrectly) twiddling the read only flag on the file when I needed to make a change.
So my question:
Is there a command (or similar) I can run that will look at my workspace files and see that there is a change that hasn't been committed. Essentially ignoring the 'reported' state of the file? Something like sync but in reverse? This would allow me to 'force commit' all those files and get the depot in the correct state.
The command you are looking for is called 'p4 reconcile'. Here's some background information: Working Disconnected from the Perforce Server.
in my project I have configuration files separately in SVN. The needs to stay on the server, so I have an SVN checkout job that run before any deploy.
If I want to deploy on my server a previous version how can I overwrite all the configuration files without having merge problem? (e.g. version 2.3 is currently on server, I need to deploy version 2.2 with a patch, and consequently update all the configuration files at version 2.2)
Basicly I want to replace an entire branch with another, avoiding any conflict.
I can use rm -rf (unix server), but is a bit risky.
You can use SVN switch using this command - svn switch branch-2.3 branch-2.2
For this you need to have these per-equites -
Branch should be cleaned up, no .svn temp files should come in picture
Any of the local changes may go away.! So make sure that, you have everything committed.
So you can handle these things easily using commands and perform the job.! Hope this help.
So, I created a new file and copied it over the one in the workspace. Then I selected "reconcile offline work" from the context menu of the directory containing the file, after I've updated the directory and made sure the workspace has the new version of the file - but Perforce says that no files have changed.
There is one more weirdness in this: Despite having the latest version of the program, both the p4 and p4v clients, perhaps, because of the server version, I don't have reconcile command available (I don't know what version is the server, and don't know how to find it out).
So, it would help if you could tell how to do the same thing as reconcile, while not having this command (it seems to be a newish addition, but I cannot imagine a workflow that doesn't require you to use it, or something that does the same thing). The VCS is practically useless if it cannot figure out on its own what files had changed since the last version...
If your server is older, and doesn't support reconcile, there are other ways to accomplish these tasks. Start here for all the details: http://answers.perforce.com/articles/KB_Article/Working-Disconnected-From-The-Perforce-Server
If you added a file to Perforce and copied it to another workspace you will need "p4 sync -k //depot/path/to/file" to reflect the change.
I am facing a problem with TortoiseSVN (my client version is 1.6.16 and the SVNversion is 1.4.6.28521).
The projectA project has the classical architecture, with three folder: trunk, branches and tags.
I have rights to Read and Write from a projectA folders (tags,branches and trunk).
While working in the trunk, there is no issue, everything works fine. The only problem is that when a release time comes (or branching time comes), and I want to create a tag (a branch), I want to use the TortoiseSVN dialog "branch/tag". Then I choose the origin from the trunk or the revision o nthe trunk i need, and choose the "To URL" like "http://..../projectA/tags/v2.0".
After clicking "OK", it will let me know that the access to "http://...../projectA/" is forbidden.
The only solution right now, is to checkout the "projectA/tags" folder to a local folder. Then in this "projectA/tags" folder I will create one new folder with the name of the tag I want to create, and I am able to commit it without any problem.
I don't want to manually create the folder of the tag/branch like this, andwould rather like to use the "branch/tag" feature of TortoiseSVN.
Anyone has an idea about this issue ?
There is a recommendation in Subversion (at least on Windows with TortoiseSVN) to use the same major version as the server. You are allowed to ignore that recommendation, and most of the time, it does not hurt, but here you may have a case where it makes a difference. You should at least check if
the server could be upgraded to 1.6.x XOR
the client (your installation) could be downgraded to 1.4.x
However, your client will ( in the second case ) no longer work with your checkout directories. Branching has changed a lot from version 1.4.x to 1.6.x, so you will face a hard time if you have to use a 1.6.x client with a 1.4.x server.
I have made some changes in one perforce client, but haven't submitted them. I want to propagate these changes to another perforce client, without submitting the changes in the first client.
Is it possible? If yes how?
Thanks
You cannot do this from within Perforce itself. You will need to perform a manual process:
sync and resolve any conflicts with the changes on Client A
sync Client B
check out target files on Client B
copy files from Client A to Client B
This process could be automated by using commands like p4 changes and p4 describe and OS tools to parse the output (like for in DOS), but this would be overkill in most cases.
check out the new shelving feature in the perforce 9.2 release (currently available in beta)- you can cache your modified files on the server, without having to check them in as a versioned change.
http://blog.perforce.com/blog/?p=1872
Although I didn't work with git-p4, the answer to this question seems to refer to your use case as well: git-p4 and pulling from other repos