Perforce Merge CLN across servers - perforce

Problem :
I have a strange requirement to move a specific CLN (Foo) from SERVER-1 to SERVER-2.
Possible Solutions I can think of :
Sol #1
Create a patch of Foo in SERVER-1 to Foo.patch
Apply the Foo.patch to SERVER-2
Sol #2
Manually merge changes of "Foo" CLN from SERVER-1 to SERVER-2 ?
If anyone have faced a similar situation, Please provide the best recommendation.

If this will only be a one off act, then syncing the files from the original server, copying them to a workspace on the new server, then adding them with 'p4 add' is the easiest way of getting the files in to the new server.
The disadvantage with this method, is that the new server, won't have any details about the files history, before they were added.
If you do need to see details of the file history on the new server, please leave a comment.
Depending on your requirements there are a few possible solutions, so I do not want to elaborate on all of them in this answer.
Cheers,
Jen.

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.

check in files on 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.

Migrating Mail from One Account to Another: imapsync or offlineimap?

I had originally asked the original, closely-related question on superuser.com, but I feel this might be a little more stackoverflow speed since I want something programmatic and automated, using tools no one there knows well. Here is the scenario:
Two accounts:
Account A (original work account with
quota)
Account B (new backup email
account)
Process:
Create folder in Account B (e.g. "2010 Email Backup" folder).
Migrate all folders in Account A nested into new folder on Account B (e.g. "2010 Email Backup" -> "Inbox", "Sent", "Trash", etc.).
I want to be able to do this every couple of months or every year, and script it for my needs with either imapsync or offlineimap. So: will using these tools, if this is possible, cause an issue when it checks Account A and clears out Account B because the original folders are different? I am not sure how specific they are, so I wanted some reports from the field. If anyone has experience with these tools, PLEASE let me know. I would love to figure this out before I hit a quota.
From the imapsync FAQ:
Q. I have moved from Braunschweig to Graz, so I would like to have my
whole Braunschweig mail sorted into a folder INBOX.Braunschweig of my
new mail account.
R.
1) First try (safe mode):
imapsync \
...
--regextrans2 's/INBOX(.*)/INBOX.Braunschweig$1/' \
--dry --justfolders
2) See if the output says everything you want imapsync to do,
--dry option is safe and does nothing real.
3) Remove --dry.
Check the imap folder tree on the target side.
4) Remove --justfolders.
Good tip, never realized you could use --dry or pick another folder with --regextrans2
Could of been possible with:
--prefix1 INBOX.Braunschweig
You might also want to use --subscribe to make sure that you don't have any folders your not subscribed to that could otherwise get missed.
We actually wrote a cPanel IMAPSYNC too.

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