2

Say, I have a project called example.vcproj to which I have added files: 1. first_file.c 2. second_file.c

first_file.c was added 10 days ago and has still not been code reviewed. Therefore I am still waiting for it and at this moment I cannot check in the files.

second_file.c was added recently. It has gone through the code review and is ready to be checked in. However since my first file is still on review, I am not able to go ahead and submit the second one, mainly because of the dependency on example.vcproj.

Please let me know the simplest way to resolve this conflict other than temporarily removing the first_file.c and reverting the example.vcproj and checking in the most recent changes. Thanks.

user1128265
  • 2,891
  • 10
  • 29
  • 34

1 Answers1

2

There are a couple of things you can try.

First, you can shelve all of your files prior to submit. That at least means you are in no danger of losing any work, as the files will be stored on the Perforce server. After you receive code review you can check them in.

Second, you can create a private branch or stream for your work-in-progress. Then whenever you hit a stable milestone on your private branch, you can get code review approval and promote it to the shared branch.

randy-wandisco
  • 3,649
  • 16
  • 11
  • Thank you for your response. I think I will go with the first method. Other than shelving the first_file.c is there anything else that I need to do? Then what about the example.vcproj? I would appreciate it if you could explain it step by step. Thank you so much. – user1128265 Feb 13 '12 at 16:34
  • From the command line you can run 'p4 shelve' on any changelist, and it will store the files on the server without officially submitting them. After you get approval you can move the files to a different changelist and submit them. – randy-wandisco Feb 15 '12 at 17:55
  • Oops, meant to keep typing. So if you have file1.c in changelist 100, and file2.c in changelist 101, you can run 'p4 shelve -c 100' and 'p4 shelve -c 101'. When you get review approval for 100, you can run 'p4 reopen -c default file1.c' and then 'p4 submit'. Shelving lets you submit in order even if you don't get code review approval in order. – randy-wandisco Feb 15 '12 at 17:57