Accurev: change package merge required - accurev

I've got a workspace backed to my collaboration stream (CS), the CS has a parent stream (Parent).
In my workspace I changed a file with version Parent/1 and then promoted it to the collaboration stream some times. Its version became CS/2.
Then I got an update from the Parent and found that I don't need to keep my changes in that file and purged it on the CS. Its version became "CS/2*" on the CS and "Parent/2" in my workspace.
Now I'm trying to make some changes in the file in my workspace and promote it to the CS again, but I've got the message "change package merge required" for the file.
If I understand correctly, it can't be promoted due to the file version in my workspace is not derived from CS/2. How can I resolve the issue and promote new changes to the CS?
P.S. Moreover I have a pack of such files - about 70 files. How can I resolve the problem for the whole pack of files?

Open the issue you are associating your promotion with.
Click on Changes tab.
Select the file from the list in changes tab.
Right click -> Remove.
Now promote using this issue.

the only way that i have found to fix this is to use the "send to>issue (specifying ancestor)" command from the version browser tree.
open accurev
view>view streams (pick your depot)
click the "active issues" icon in the upper-right corner
click the "show active issues" icon under the problem stream
right-click>"send to change palatte" on the source issue
right-click>"browse versions" on the problem file
select "everything" in the "show" dropdown
right-click>"send to">"issue (specifying basis)" on the latest version in the current stream
click on the earliest ancestor (this should be a common ancestor of all versions)
enter the target ticket number and click "ok"
these steps should work for any source/target issue, even "unaffiliated" changes. technically, you shouldn't have to "show everything" and choose the oldest version. you really just need to get back to a common ancestor.

Related

Intellij show possible merge conflicts before actual merge

I have a file that was changed in one branch and renamed in another (but from comparison perspective it was deleted). I use IntelliJ for merging. When I merge the branch where the file was changed into the one where it was deleted, in the merge window the IntelliJ shows two panels one for the deleted file which is obviously empty and the other one for modified file with changes highlighted in darker pink.
I need to add these changes to my renamed file. And I can do it manually, np, however I cannot keep the merge/comparison window open. It must be closed before I can do any code modifications.
My question is: is there a way to get the same kind of comparison with possible merge conflicts highlighted before the actual merge.
IntelliJ relies on the command-line git and needs git to attempt the merge before it can show you the merge dialog. So, unfortunately, it is not possible to get the merge dialog without starting the merge.
However, it seems that to solve the task you only need the merge dialog to be non-modal - here is the request for it in JetBrains tracker https://youtrack.jetbrains.com/issue/IDEA-66552
Using version IDEA 2021.3.3 (Ultimate Edition), I am able to open a merge non-modally by:
When the merge dialog appears, click Cancel
Open the Git view
Click on a changed file in the Local Changes tab.
This initially shows the merge diff in the side pane of the Git view.
To open the merge diff in the main editor area, right-click on the file (in the Local Changes tab) and select "Show Diff".
This will open the merge diff in the main editor area.

How to do a svn compare between local code base and latest from repository like in Eclipse

In Eclipse, when click Synchronize view it will show up a tree structure of diff comparison from local to svn repo. Click on each file will pop up view to show code diff.
Is there a similar feature in Intellij and how to activate it? I am on latest Intellij Ultimate btw.
Click on the Version Control button on the bottom, click on the Incoming tab. Hit the refresh button (circle with arrows). First time it will ask you if you want to set up automatic refresh. It will then show any changes pending from the repository. You can click on files and get a diff. (You may have to right click on a revision and select "Show Affected Files".)
There is no exact same view in IDEA. See https://youtrack.jetbrains.com/issue/IDEA-119596
You can use Subversion -> Compare to the Latest repository version from a file's context menu.
There is also the Incoming tab that shows changes from the server not yet applied to your working copy. You could invoke Show Diff with local from the Details pane of the Incoming change

Accurev: Cannot remove workspace/stream

I'm trying to remove a workspace (or clone it to look like the parent, but I can't seem to do either). When I try, however, I get this message: Cannot remove workspace test_workspace, because it has a non-empty default group.
From what I've read, it means that there are active files (as shown by the 3 little green dots to the right of stream). I've tried everything to get those to go away but they just seem to stick around and therefore result in me being unable to remove the stream.
Alternatively, I could completely wipe out the stream and replace with the parent version, but I can't seem to do that either.
Any help would be greatly appreciated.
You need to purge the active files in this workspace.
Open the workspace and click on the "Default Group" filter -> select the files -> right click -> revert to backed.
If no files appear in the "Default Group" filter, click on the stranded filter and do the same as above to revert those files.
If you are using AccuRev 6.x, click on the outgoing mode and click on "Member" and "Stranded" to get a list of the active files.
Once you have done that, you can remove the workspace.
Similar problem here, fixed it following #jstanley's comment.
Open Workspace-> select it-> right click-> Edit.
In that prompt, I set the Location path to where I wanted it to put it on my local machine. For some reason, it was unable to "create a folder" and threw errors, so make sure Append Workspace name is unchecked and you select a folder that already exists.
It then populated the folder on my local machine attached to the workspace. And revert to basis worked, so afterwards I could remove the workspace and delete the folder.

How to download a specific version of the code from RTC?

In SVN we have one option to download code on a particular revision. This provides the flexibility to download code on old revision also for build.
Is there a option in RTC to download a code on particular revision?
Yes: once you have done a repo workspace on a stream (where that old version was baselined), you can select a component (in the components section of your workspace), and click on "Replace with".
You can then chose the baseline you want to see, and it will be downloaded if you have a local workspace or sandbox in place.
Simply don't "deliver" to the stream, or you would replace the most recent baseline by an old one.
For setting a file to an older version, it is a bit manual (as in this thread):
Right click on the file in the change set, and select "show history" (or if the file is in an editor, right click on the editor and select "Team -> Show_History). That will open the History view on the file, form which you can select the version you want.
SOLVED! 🚀
The only thing that worked for me was:
.
On your workspace's tab [Pending Changes] -> RightClick on the component that you want to get file(s) back -> [Show] -> [History]
RightClick on the "PackOfChanges" that has your wanted file(s) -> [Revert]
.
PS: It won't actually revert your actual project state to that day, and won't undo that "commit". The only thing that it does is showing on your workspace's tab [Pending Changes] all the diferences between that day and you actual code, and in every file(s) that you want back you:
"DoubleClick" the file that you want back that was showed by revert, and an Editor will appear with the diferences between you file's actual code and it self on that day, and you pass all the code from the right to the left.
After it's done, on your workspace's tab [Pending Changes], RightClick on the RevertPackage -> Remove
.
Have a nice day! 😄

How can I access previous checked in versions of workspace repositroy?

How can I access previous checked in versions of workspace repository?
I just seem to be able to compare against the latest changes sets delivered to the stream. Can I also view/compare previous version of a file which has been checked into my repository workspace ?
You can display the history of a file checked in by right-clicking on ("Show History").
From there, in the "History" view, you can right-click on any version and select "Compare to" with any other version (not just the previous one).
As explained in this thread, you can access (open) the content of any older version you want, which gives you the opportunity of replacing the current version with said content, should you want to revert back for just one file.
Rolling back would be a slightly different issue:
If the change set that created the current version contains only that version, then you can replace the current version with the previous version by discarding that change set.
But if that change-set modifies multiple versions, you cannot roll back just that file. Work Item 59688 requests the ability to "split" a change set, so you can move this change into it's own separate change set (and then you could roll back the change to just that file).
Note that the history will be by default the one for that given file done in your repo workspace (checkins) or in your stream (deliver).
The same "show history" done at the Component level (when you right click on a Component, in the "Components" section, and select "Show Repository files", would give the full history (done on any Stream), but wouldn't display the history done on repo workspace (chekins).
Note also that only RTC4.0 has "Checkin history"
This is essentially the history of a file within a change set.
Each time you check-in a file into a change set, the content is stored in the repository. Normally you see only the final version of a file within the change set. But sometimes you want to go back and see what the intermediate versions of the file were. Check-in History is an expansion of the changes made to the file each time it was checked into a change set.