check in files on perforce - perforce

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.

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.

Related

How to view merge review comments and file changes in GitLab?

I'm performing a merge review (code review) in GitLab. I entered some file comments then the author responded to the comments and made some changes to the files. I can view the comment thread, and the relevant portion of the original file on the merge request Overview page. And a link there will take me to a diff between the original and changed files.
But how can I see the comment, response and file diff at the same time? Open the diff link in a new window?
GitLab version = Enterprise Edition 12.10.1-ee
(Newbie stackexchange user - Apologies for any breaches of etiquette.)
Check if GitLab 14.6 (December 2021) improves your use case:
View inline the change that outdated a merge request thread
When addressing review feedback in merge requests, you often change lines your reviewers have commented on.
In those comment threads, GitLab indicates that new changes were made.
However, to understand if those new changes address the feedback, reviewers would have to navigate away from the context of the discussion.
Now, when viewing threads related to old changes, you can view the new changes directly in the thread.
This improved context helps you review faster and more accurately.
See Documentation and Issue.
If you want to see all the merge requests, you can check that in the left panel as 'Merge request' option. If you check the particular merge request, you can see Discussion, Commits , Changes at the bottom. It will be easier here for you to check what changes has been made.

How do I modify the code of a merge request before merging in GitLab?

The scenario is as follows: A user has opened a merge request that adds a new feature to my code. Their code however contains a few bugs. I know how to fix the appropriate parts but I'd prefer keeping my repository free of code that has known issues. Therefore I'd like to modify their code before merging it.
I know I could also manually copy over the changes but I would still like to give the user that opened the merge request credit for their contribution.
You could take the user's changes (pull them over to your development environment) using Git, and then add your changes, and then merge the lot -- this way your user's commits are visible, and your commits are visible.
You could also add your user to a CREDITS file to give them credit as a contributor.
You could also ask the user to fix the bugs (which helps the user too, to learn how to improve their code) and then merge the change.

Perforce -Keep working on the project while the code is under review

I am a git person. In git, after I finishing a little feature, I will submit the branch to review and start a new branch to work on new features.
For example, I had submitted a code recview for feature A, and it is still under review. At this time, I want to start working on feature B, assuming feature A's code will be merged in the near future. In Git, typically I just create a new branch to work on the new feature, if there is some problem with feature A I can easily switch back to branch A to fix it and merge the fixed version to my new feature branch.
How's it achieved in perforce? Should I copy the whole code somewhere as a way to manage branch myself?
You can do this in Perforce exactly the same way you'd do it in Git, if you like -- create your feature B branch and work on feature B there. If you need to make changes to your feature A branch, those can be merged back to your mainline and/or your feature B branch.
If you do your code reviews as shelves, you can have any number of them in development at a time; a shelved change is effectively "rebased" onto submitted changes when you sync+resolve.
FWIW, usually the way I've done reviews in Perforce is to make my changes on my own development branch, set up the merge to the mainline, and then shelve that for review. That way I can continue work on my development branch uninterrupted, I don't need to create a new branch, and if there's a fix needed to my merge-in-progress I can just amend the shelved change (either by submitting the fix to my branch and adding it to the merge, or making the edit as part of the merge operation); it also has the benefit of making conflict resolution (if any) part of the change under review.

TFS Process flow for fixing bug in older version

Scenario:
I have a bug to fix in changeset 100. We currently have 125 changesets. I also am in the middle of some large changes. We have a production bug to fix.
Requirement
To put my current changes on hold
pull up the code from changeset 100 (the current production code
base)
Fix the bug. Recompile. Deploy.
Resume my work from point 1. And also ensure it includes the bug fix.
Presumed Process Flow
Shelve Pending Changes to server (not locally...just to make sure the changes are safe.
Source Control > Get Specific Version and get change set 100
Fix the bug....now I'm not sure of next steps..
Check in; unshelve? OR
Check in; Get Latest (which will bring me up to the last change set 125) , then unshelve?
And how does the fixed bug code get merged in?

Modfification history in webdash board unseen?

I am using my ccnet which is configured with the clear case
and everything is working fine as expected,but i am unable to see
anything in the "ViewProjectModificationHistory".whenever i click this
tab,i see a message which tells that :"No history Data found, make
sure you use the modificationHistory Publisher for this
project".Infact i had added under the tag.And to my
suprise,when i open this same link in the other persons system,it
opens well and fine and see all the modification history recorded.
So can anyone please tell me what could be this issue and how can it
be resolved?
Thanks and regards
Maddy
You should check your build history file. This will contain the XML data that feeds these reports. In particular, check the modifications/modification nodes to see if they are populated or not.
My guess is that the modifications are not there - so there may be nothing to display.
Another gotcha I have caught myself doing is not actually checking that there was in fact changes committed since the last time I built a project.

Resources