AccuRev- 'files in Deep overlap' section - accurev

What I did:
AccuRev update
SourceCode does not compile any more and it should because it compiles on other machines
I do not understand it so I delete my workspace from my HDD and I populate it back from AccuRev
I get lots and lots of files in 'Underlap' and in 'Deep Overlap' state
Questions here:
why did I get files in this status? (and how can I solve this problem, I reverted changes to files from 'Underlap' and now I am merging files from 'Deep Overlap' but there are lots of them!
how can I just get files from repo?
Thank you!

The deep overlap filter will give you a list of overlap files in your workspace and/or files in a stream above your workspace.
For stream overlap, once you resolve the deep overlaps, you will need to promote those changes into the stream where the overlap appears to clear this status.
If you want a clean workspace wrt your basis stream, I would recommend you purge (revert to backed) any elements in your default group and pending filter. Once complete, update the workspace. Now your workspace should be identical with the basis stream.

Related

Exchanging work before accurev promote

My colleague and I are participating in a huge project located in Accurev. We've already created own workspaces backed with some stream (let's call it zzz-stream) which is used by many other participants, not only by us.
The point is that we want to exchange our work between our workspaces, make some changes, exchange again, etc. BEFORE making the changes accessible for others, i.e. in other words we don't want to propagate our changes until it is stable and tested, but we want be able to work on it together.
My idea was to create new stream (yyy-stream) backed with zzz-stream, and then change our workspaces to be backed with yyy-stream. But unfortunately I have no rights to create streams.
My second idea was to use a workspace as backed stream, but it doesn't work because Accurev can't use ws as backed stream.
Is there any solution for our problem?
UPD: I accepted Brad's answer as most detailed. However Accurev is too heavy and sluggish to be used effectively. So actually I prefer to use Git for internal needs over the accurev workspace. (see Accurev externally, git internally)
Your idea of creating the yyy-stream is the EXACT right way to do it. The other options are decent workarounds for one-off situations, but creating the extra stream is simple and is fully leveraging AccuRev's capabilities.
That being said, I understand that your admins have stream creation locked down. They of course want control, but should be allowing for maximizing developer productivity and not forcing workarounds like this. My guess is they have stream creation locked down to a particular group being enforced by the server-admin trigger. One common thing I have seen other large sites do is:
- allow streams to be freely created off of a list of acceptable streams (easy to do in the trigger)
- enforce naming rules on the stream creation. This is important to admins in large sites to keep things organized. Again, this is very easy to enforce via the server-admin trigger.
Bottom line, if this is a common situation, work with the admins to allow this capability as per the above. If they have any questions, they are more than welcome to contact AccuRev and we will help them out.
Your idea on using another stream for you and your peer is a good one and is commonly called a collaboration stream. If your site has stream creation locked down, you would need to work with your AccuRev administrator to make that happen.
Another option is for you and the other developer to pull the keeps from the other workspace into your own stream. This relies on both of you being diligent about doing keeps and then you can look at the history of the other developer's workspace to find the keep operation, right-click that transaction and then select Send to Workspace. The destination workspace must be your own.
A third option (more for a situation where you are in your workspace and know exactly what file you want to grab the other users changes)is to bring up the version browser for the file, right click and select history/browse versions. Look for the other workspace, highlight the version in that workspace, right click and select send to workspace. This will checkout that version into your workspace.
This is similar to the change palette suggestion but quicker if your looking to this on a file basis.
Another idea is to use different version control system (e.g. git or svn) over Accurev workspace to exchange the changes and keep our history separated from zzz-stream. (similar to Accurev externally, git internally) Only changed files should be added to other VCS, not whole project. Some merge problems occur though.

How can I prevent perforce from opening / moving deleted files?

Hello helpful persons,
I'm working with trying to set up some new branch structures in our companies codebase for organization and sanity purposes. True to form decision makers have changed their minds and want the structure to be changed a bit from what I already have in place. Not an over-the-top request though, because no one is yet using the new structure so I have "free reign".
I need to simply move these thousands of files in the containing branch directories (//depot/main/... and //depot/dev/... respectively) into a //depot/main/[product_name]/... structure etc. which I'm on board with and understand the advantages.
While opening the files from //depot/main/... for edit and move I see in my output that there are several warning messages:
warning: edit of deleted file
and
warning: move of deleted file
How can I tell perforce that I do not want to open deleted files for edit, and in turn that I do not want to move deleted files to the new location(s)?
I have a feeling that there is some documentation that I am either not understanding or not finding properly.
Generally you only get that particular warning if you aren't synced to head and are trying to move a file. Make sure you are synced to the head revisions.
As suggested by raven you should probably be using integrate for this. Generally my recommendation is to use 'p4edit/p4 move' intra-branch and 'p4 populate/integ/copy/merge' for interbranch branch integrations.

Move file in one AccuRev workspace that has been edited in another workspace

We have a need to refactor a code base. The thing is that this will be done by one person and it would be desirable to avoid having the rest of the development team sitting idle while this job takes place.
We therefore tried the following scenario to see if it is possible to work in parallel.
Created file test.txt in directory first in developer A's workspace.
Promoted this file.
Updated developer B's workspace, thereby getting file test.txt
In A's workspace moved file test.txt to directory second.
Promoted this move.
In B's workspace edited file test.txt while it still resides in directory first (no update is made thereby emulating that work is done while refactoring is taking place).
Tried to promote and got a message saying that file test.txt had been modified (correct, file has been moved).
Tried to merge but got an error message saying that AccuRev can't merge since the file is missing in directory second (where it has been moved).
Tried to update B's workspace but that is not allowed since there is a modified file that needs to be merged first.
We are now stuck in a catch 22 situation.
We did try to place a fake file in directory second but that is not being recognized since this file does not belong to the workspace.
Has anyone out there tried something like this and gotten it to work?
It is of course possible to copy files but if there is a better way we would be grateful to hear about this. Or if this is a known bug or limitation in the tool.
We will contact also contact AccuRev support but I thought that I might be able to get some useful tips from the community.
Currently we are using AccuRev client 5.5.0.
Thanks for any suggestions on how to make the tool support this operation.
Referring to your steps 6 & 7: In AccuRev 5.5 after a file is edited and has a (modified) status you first have to keep before you can promote.
At step 8 you could try doing the merge from the Browse Versions view of the file. That way you can select any node to merge with, including the one that has been moved.
Step 9. An AccuRev update will not run successfully if one of the files to be updated is (modified). This is by design. You can keep the file so it has (kept)(member) status then run the update.
David Howland
After contact with AccuRev support the answer is that the only option available is to copy the file to some temp directory, revert the changes, update the workspace and copy the file into the new location in the workspace.
AccuRev will at least tell you which files you have to copy since they will be marked as modified.
I could experimentally verify David's remark to step 9 using AccuRev 5.5.
Let's assume that in the workspace of user A the file was moved and the move was promoted, while in the workspace of user B the file was modified and user B is about to promote his/her change.
Before the file is kept, it will not be possible for user B neither to merge nor to update. But after keeping the modified file the update is possible. The file is first marked as overlap, then the merge succeeds in the new location. Basically, this avoids creating a copy of the file, reverting it and restoring it in the new location after an update, which can be quite cumbersome, as AccuRev does not reveal easily where the move goes.
If user B promotes the modification before user A promotes the move, all goes smoothly, i.e. on update the moved file appears as overlap, but easily merges into the moved file in the new location.
Similar results are obtained when the two users have workspaces connected to different streams and the overlap occurs on a common parent stream. Only if the file is unkept, an error can occur (i.e. only if the move is promoted before the change). Then a simple keep allows to proceed as usual (update, merge, then promote).

AccuRev: Some files from the backing stream aren't in my workspace and aren't Missing

3 files present in the backing stream in AccuRev aren't in my workspace after Updating it.
Some things I've tried:
Checked the Missing search. They don't show, with or without timestamp optimization.
Recursively populated the parent of the directories where the missing files are(n't). Got nothing.
Manually copied them from another workspace under the same stream, where they do show. Those copies appeared as External in my workspace, so I deleted them.
As per this question, did accurev show -fx wspaces. Target_trans for that workspace is the same as Trans.
Ran accurev update -9 anyway. AccuRev says everything's up to date, nothing to do.
Other possibly-relevant info:
Two coworkers with workspaces off that same backing stream have the files I'm missing.
All 3 "missing" files are in one of 2 directories that were renamed fairly recently.
The stream hierarchy is shallow, only one parent between the backing stream and the root. However, that parent stream wasn't always there. It was recently inserted, and all changes from our prior release change paletted into it, so the issues list for the backing stream would reflect only changes since the prior release, not since the beginning of time. It has had that effect, with no other anomalies I'm aware of.
I could abandon this workspace and create a new one, but I'd rather not if I don't have to. Any further suggestions would be appreciated.
Could they be excluded?
Check your include/exclude rules.
If they are not, create a new workspace. If they appear in the new workspace, just remove the old one. I have seen this issue before in the past.

Undo an Update in AccuRev?

How do I undo an update in Accurev? I want to revert to a state where contents of the files are exactly how it was before an "update" operation?
There are numerous ways to change the contents in your workspace to reflect an earlier configuration. Based on the limited description where you reference "all the files under CM", I'll make the assumption that you want to roll back your entire workspace as opposed to a select few files.
Question: does everyone parented by the same stream as your workspace want to roll back, or just you? If it's everyone, you can change the time basis of that parent stream to reflect the specific point in time you want to revert to. Once that is done, run Update, and you're good. If it's just you and it's more than a small sampling of files, I'd suggest creating a personal time-based stream, setting the time to when you want, and re-parenting your workspace to it:
Current_parent -- New_personal_time_stream -- your_workspace
There are other options as well if you just want to deal with a few select files, but it seems like this is what you're after...
Cheers,
~James