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

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.

Related

Accurev revert action

I am working with Accurev and recently I was forced to perform a revert on a recent promote. I followed the general guidelines, accessed the stream's history and performed a revert action on a selected transaction.
That particular transaction involved already existent files but also new ones.
Now here comes the main problem: after the revert the existent files were returned to their previous version but the files that were at their first version appeared in the root of the stream regardless of the path where they were initially placed and were in the state Defunct. Of course this mainly visually disturbing but I am also wondering what will happen later on when someone will try to readd those same files to the stream.
Will there be a conflict, will they be repositioned where they were initially added? At this point I am thinking about reverting the revert action but it already seems really overcomplicated and it look like it would only generate more problems.
Lets say you have a stream hierarchy of: Stream1 - Stream2 - Workspace1
In this hierarchy you have a file called foo.c.
In Stream2, this file has a defunct status.
If you add foo.c to source control in a Workspace1 and promote, the defunct version in Stream2 is now stranded and the newly added appears with a member status. The stranded file will appear when you search for stranded elements.
If you try and promote the newly added foo.c, it will fail due to being an evil twin as the original foo.c still exists in Stream1.
To clear this, you can promote the stranded foo.c from Stream2 and then promote the newly added foo.c.

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- 'files in Deep overlap' section

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.

Accurev Promotion order

We are using Accurev 5.6. We run into a weird issue during promotion. One of our developers defuncted a file abc.txt in his workspace and promoted it to the backing stream under an issue. Then after a few days, he realized that he needed his file. He created a file with the same name and promoted it up under the same issue. Before the release, we tried to promote this issue to a parent stream. The Accurev complained saying the file abc.txt existed in the parent stream and prevented us from promoting it.
It looks like the Accurev promotion got the order wrong. It tried to promote the activity of creation of abc.txt first instead of defunct of abc.txt first. What Accurev should have done is to promote activities based on time of the activities: first, defunct the abc.txt in the parent stream and then create the abc.txt file again under a different element ID.
Is this an Accurev bug? Is there anyway to configure Accurev to promote based on time of the activities within one single issue?
This is not a bug in Accurev. This is a nuance of Accurev. Accurev gives each new element an id. This id is unique to that element and stays with that object as it gets defuncted, renamed, moved, etc. This is just how Accurev works, which makes it a blessing and a curse.
Steps to Resolve:
Rename the 2nd element the developer promoted.
Defunct this element.
Undefunct the 1st element.
Promote up both changes.
At this point, you can promote up abc.txt.
You can then purge (Revert to Backed) the defuncted (2nd element).
a. You would want to Revert to Backed in this instance because you probably don't care about that version and so it doesn't sit in the default group of your stream forever.
Search the online documentation for twin for more detailed information. Sorry I couldn't get a direct link.
Twins are a pain, but it looks like Accurev has been slowly improving detecting and fixing them. See the latest release (5.7).

Remove a workspace in Accurev

Is there any command which can let me remove a workspace from Accurev? I tried accurev rmws WorkspaceName, and it says its removed the workspace, but when I try recreating the workspace it gives me the message that the workspace already exists.
I'd appreciate any help.
It is not possible at all in AccuRev to remove a workspace/stream/snapshot name once it's been created.
Deleting a workspace is just marking it as deleted - for later revival if that should be necessary.
This is clearly stated in the docs (CLI.pdf):
The rmws command makes the specified workspace inactive. More precisely, it deactivates the workspace stream in the depot; [...] Note: after performing an rmws command, you cannot then create a new workspace with the same name. The name remains irrevocably associated with the inactive workspace.
You can change other parameters of the workspace though: You can give it a new name. You can move it to a new machine. You can move it to a new backing stream.
Since you're trying to create a new workspace with the same name....
At a higher level you want to think of a workspace as mapping the current backing configuration to the current location on disk. With this in mind, you'll likely find yourself removing workspaces less. For example, I have a single 'mainline_dev' named workspace that gets moved around to many active project streams over the course of the month. Once I'm done on a given activity (say for the week), I'll promote my work (assign to my story/task/bugfix), and then reparent/move my workspace to the next stream to work. Upon 'update', my local disk fully mirror's the new stream location (hierarchy).
Thus, if you more generically name your workspace, you'll find a pattern of reusing them rather than removing and recreating.
HTH!