Perforce workflow
Hi there, I am programming on Windows and I've been looking into version control systems for a while now, but I can't find anything that works exactly the way I want to.
I know that most people use SVN these days, but I really don't like the integration into the Windows explorer.
In the last few days I've been looking into Perforce which has a nice GUI and some nice other features, it's also free for up to two users which is perfect for me. I just don't quite understand the workflow.
I checked my whole project I am working on into the depot and checked out the whole project again so that I can edit the files in Visual Studio. Now, the problem is that when I open up P4V it doesn't tell me which files I've changed and I basically have to check in all the files which makes it a bit tricky to figure out what actually has changed between revisions. Labelling seems also a bit weird to me, doesn't quite work the way I'd expect. I've had a look for a tutorial (for P4V), but I can't seem to find anything good.
Is it worth the trouble to get into Perforce or should I try something else?
You shouldn't be checking out all the files at once. To use it properly you should:
Check in all files for your new project.
When wanting to build a project SYNC to head revision.
To edit an individual file check out just that file.
The files that are checked out will be the ones that have changed.
Check in all files for your new project.
When wanting to build a project SYNC to head revision.
To edit an individual file check out just that file.
The files that are checked out will be the ones that have changed.
As Buster2000 said, you should only check out the files you need.
Also, you can right click on the default changelist and do "Revert Unchanged Files", and then manually diff any ones that look suspicious (E.g. at work, the Nintendo DS model exporter outputs the export date/time into the file, which means that if you export the same file twice, you get different data contents).
Also, you can right click on the default changelist and do "Revert Unchanged Files", and then manually diff any ones that look suspicious (E.g. at work, the Nintendo DS model exporter outputs the export date/time into the file, which means that if you export the same file twice, you get different data contents).
That's what I thought, but what kind of a work flow is that? I mean, first of all you would have to check out the Visual Studio project file to start up Visual Studio and when you want to add a new feature to your project you usually don't know which files you need to change. Every time you need to change another file you have to check it out and in the end this change might not even be required. Does that make sense?
That's why I use the Visual Studio integration; when you edit a file it is checked out automagically so that you can edit it (this include project files, which don't need to be checked out to start VS).
You can also use it to add new files to the project directly in the IDE (although this isn't as clean as the files get added in the IDE and normally require that you submit them there and THEN commit them in the p4 program).
I also had the default commit options set to 'revert unchanged files' for my submissions which means even if I do check out a file and undo the edits the file doesn't end up being commited back.
So, the work flow becomes;
- start IDE
- edit files
- swap to p4 and commit
- repeat
You can also use it to add new files to the project directly in the IDE (although this isn't as clean as the files get added in the IDE and normally require that you submit them there and THEN commit them in the p4 program).
I also had the default commit options set to 'revert unchanged files' for my submissions which means even if I do check out a file and undo the edits the file doesn't end up being commited back.
So, the work flow becomes;
- start IDE
- edit files
- swap to p4 and commit
- repeat
Only check out a file when you absolutly need to change it not because you think you are going to need it.
I can understand that at first it may seem like extra effort but, it is worth it in the long run.
As for the Visual Studio project file it's up to you how you handle this. You could just not check in the solution file and only check in your source files.
I can understand that at first it may seem like extra effort but, it is worth it in the long run.
As for the Visual Studio project file it's up to you how you handle this. You could just not check in the solution file and only check in your source files.
Quote: Original post by Buster2000
Only check out a file when you absolutly need to change it not because you think you are going to need it.
Actually, you can check out as much as you like. You can always 'revert unchanged files' before you submit your change list. For example, when checking out a C# form in DevStudio, it checks out the designer and resx files as well. If you don't change the design you can safely revert them, since they are unchanged.
Only exception are binary files which are locked to other users by default. You have to be careful with those.
hth,
CipherCraft
I bought VisualSVN, a plugin for visual studio to have tight integration with SVN in the editor. still, my artists use tortoise SVN to update their parts and love the explorer integration.
and we all together use visualsvnserver, which is free. so i only payed for one licence (and monthly pay a little for tortoise svn in general, but that's just because i liked the donationbutton there :))
and we all together use visualsvnserver, which is free. so i only payed for one licence (and monthly pay a little for tortoise svn in general, but that's just because i liked the donationbutton there :))
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
- the workflow is usually quite simple. Open project, edit files (the visual studio integration will automatically check the files out for you), then when you're satisfied, commit your changes using perforce client. rinse and repeat.
- revert unchanged files will remove unmodified files from the changelist, and leave you with only modified files. If you check out whole directories, that will helps.
Perforce is great. Any source control software will have it's little quirks anyway, so if I were you, and you aren't worried about licenses, I'd stick with it.
- revert unchanged files will remove unmodified files from the changelist, and leave you with only modified files. If you check out whole directories, that will helps.
Perforce is great. Any source control software will have it's little quirks anyway, so if I were you, and you aren't worried about licenses, I'd stick with it.
Everything is better with Metal.
Quote: Original post by samson77
I know that most people use SVN these days, but I really don't like the integration into the Windows explorer.
There are hundreds of SVN clients available, some of which are designed to be integrated into explorer, others which run as applications, and some which are plugins for applications such as Visual Studio. Pick and choose the ones that meet your needs, or install all three types if you really want.
As for the workflow - bear in mind these systems are designed for multi-user environments. If you check out the entire project, then it is locked and noone else can touch it. That is why you are only supposed to check out the files you need - allowing others to check out other parts of the system and work on them at the same time. You should know the project well enough to know exactly what file you need to open. In any case, most systems will leave all the files on your system but in read-only mode until checked out, allowing you to view them and see where you need to make the changes prior to checking out the file.
As for the handling of project files - the only time these will change is if you change a compile or project setting, or add new files. Most of the time you will not need to modify this file.
Gavin Coates
[size="1"]IT Engineer / Web Developer / Aviation Consultant
[size="1"][ Taxiway Alpha ] [ Personal Home Page ]
[size="1"]IT Engineer / Web Developer / Aviation Consultant
[size="1"][ Taxiway Alpha ] [ Personal Home Page ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement