How to undo a checkout that has no activity attached to it - clearcase-ucm

I have a quite weird problem here with UCM-ClearCase.
A user tried to deliver from his dev-stream to the int-stream of the project. For some reason he decided that he needed to cancel the delivery and executed "deliver -cancel". According to him this did not work the first time (although he does not remember the error message) but the second time he issued the command the delivery was actually canceled.
The problem now is that he has a checkout in his int-view (!) that does not have an activity attached to it. The activity of the delivery was deleted (obviously during the cancellation of the delivery). If he tries to undo the checkout in the int-stream (by using "unco") ClearCase outputs a warning that he needs to set an activity and a view context in order to undo the checkout. Setting some activity (and a view context) is no good, the same error message appears.
EDIT:
The exact error message given by ClearCase is:
cleartool: Error: To operate on UCM branch, must be set to an activity and a UCM view.
cleartool: Error: Unable to cancel checkout for "PathToFolder".
The checked out element is only a folder and no other elements (neither files nor folders) are checked out
END_OF_EDIT
Creating a new activity in order to attach it to the checkout did not help either as I did not find a command to attach an activity to a already checked out folder.
According to IBM we could remove the view and all its references and then re-create it which should solve the issue of the checkout.
I am kind of hesitant to do so without being sure that there is no other way to handle the situation (especially as the above-mentioned link states that there might be cases when removing the view does not really help). Is anyone aware of a different solution for this kind of situation?
Best Regards

I confirm that to remove all checkouts associated with a specific vob and view is
cleartool rmview -force -uuid (uuid_of_the_view) -vob \aVob
See "unable to perform delivery on clearcase because of checked out file in snapshot view?"
Simply make sure the user has no other checked out files.

Related

Migrating shelvesets and MyWork to a new domain user

Our IT decided to migrate AD to a new domain. Now, those who did migrate their accounts, facing an issue - they've lost code reviews and shelvesets. They didn't really lost it. It is still accessible via "Find Shelvesets" and enter olddomain\user. But "My Work" is now disconnected. And even opening the "My Work" query and modifying a user name to the old user, still no success.
To clarify - only users being moved to new domain, not the TFS server
Did anyone have done something like this and any recommendations, workarounds?
They unfortunately did the domain move incorrectly. If done correctly, the data will carry over to the new user. Unfortunately there is no proper fix after messing this up as TFS now has 2 records with a unique identifier. These records can' be removed or merged.
You should be able to do the following in a script:
create a workspace (tf vc workspace)
map the project folder (tf vc map)
get latest (tf vc get)
query all shelvesets of your old user (tf vc shevesets)
in a loop
Unshelve shelfset (tf vc unshelve)
Shelve a new one under your current user (tf vc shelve)
Undo pending changes (tf vc undo)
A number of these commands support a /format:xml argument, making it easy to call them in a PowerShell script and extracting the data for the next steps.
I don't think my-work will restore the associated work items and all. My Work has been removed from recent versions of Visual Studio, so you could use this as a good time to get used to that.
Other things that may have gone missing:
"My Queries" under work items
My Capacity
Work item associations
Pending changes in workspaces
The correct way to do TFS domain migrations is to suspend the server, do the account migration, then run tfsconfig identities:
{Server install path}\Tools>TfsConfig.exe identities /change /fromdomain:old /todomain:new /account:old /toaccount:new
But this can only be done as long as TFS hasn't yet synced the new identity into the database. This may help future issues as they move new users over.

Tortoise SVN Log messages does not update

SVN repository keeps the log messages as properties attached to each revision. these properties are kept in db/revprops folder of repository with same numbering as revision. I needed to change format of the log messages and include some extra information. Format of the prop files (at least for version 7 uncompressed) is just key value in text format. I wrote a small program to do this and successfully edited the log messages.
Running SVN Log verifies the command line and shows updated log messages
Problem
Opening TortoiseSVN in dev computers does not show the updated messages in list; however if developer right click on the revision item in list and select Edit log message the edited message will show up. Even checkout of whole repository to new folder still shows the old message.
Question
Above observation makes me believe that TortoiseSVN somehow caches the log messages in client computers. Where is this information stored?
Yes, TortoiseSVN caches the log messages and changed paths. You should be able to clear the cache via TortoiseSVN Settings | Log Caching | Cached Repositories.
Read TortoiseSVN Manual | Log Caching & Cached Repositories for further information.
NOTE: Log caching is a very helpful feature. Don't disable it and be careful when you enter log messages.
On the SVN setting go to log caching, and under tab 'global setting' untick the checkbox 'enable log caching'.
click 'ok' .
it shall solve your problem

Execute callback on Firefox extension installation

I want to provide my users with a link to install a Firefox extension using the InstallTrigger.install. This requires a Javascript object with url as parameter and a optional callback which is executed after the browser handles the action.
According to the MDN documentation this callback is only executed when the user has whitelisted my website. That would be not the case in 99% of the time.
Would there be another way to execute a callback? The main focus is to provide the user a sensible error message when the installation fails or is cancelled.
Firefox simply cannot know whether the installation is canceled. Typically, when you try to install from a third-party site Firefox will show you the message: "Firefox prevented this site from asking you to install software on your computer." Now the user could click "Allow", he could dismiss the message, but he doesn't have to do either. He could also click Alt-Left to go to the previous page - the notification will stay and the installation can still be started but your web page (and any callbacks) will be gone. And even if the user simply dismisses the message: the extension installation icon stays in the URL bar and the notification can be brought back at any time.
So whatever your website needs to do: just do it, don't wait for the user to make a decision. If you want to explain the consequences of denying the installation - explain them. If you want to present alternative ways to install the extension - present them. But don't expect that you will be given a second chance if the user doesn't want to install your extension.

Getting Changesets in build process workflow activity

I have a custom Code Activity that sends out a status email at the end of the build process. So far I have it working except I cant seem to get the Associated Changesets and Work Items.
Right now I am using the code below to try to get the changesets and work items but it is returning an empty List.
IList<IChangesetSummary> changesetSums = InformationNodeConverters.GetAssociatedChangesets(buildDetails);
IList<IWorkItemSummary> workItemSums = InformationNodeConverters.GetAssociatedWorkItems(buildDetails);
My CodeActivity is being run well after the AssociateChangesetsAndWorkItems activity has run and finished and the changesets and Work items show up in the build summary in Visual Studios.
The problem is, that IBuildDetail somehow does not get updated until the whole build is finished, either you use reference available in build process itself or query a new IBuildDetail separately. I have tried both when executing Powershell script near the end of the process (the behavior was the same both on agent and on controller).
The solution I have made was to use associatedChangesets variable, which contains result of AssociateChangesetsAndWorkItems activity in the default process template. This gives you an array of associated changesets.
Obtaining associated work items would then be easy, since this information should be already present. However, I have not tested this, since I did not need work items.

How to run rollback custom action in Wise Installer Editor?

I'm making an installer that uses certain custom actions. I want to create a rollback action that undoes this changes when the installation is cancelled or unsuccessful.
What I've tried so far is what the documentation tells you to do, which is call the CA in deferred-mode and set "rollback only" in the In-Script Options. if you cancel the installation, the moment the installer tries to call the CA, the installation fails, it doesn't matter what the content of the CA is, it always fails the moment the installer tries to call it.
It says the installer couldn't execute a find a program necessary for the installation (the CA), even though the CA is called with "Run WiseScript From Installation", so the CA SHOULD be there.
It sounds like the setup is hitting an error inside your rollback custom action. The first thing I would do to prevent the setup from bombing out would be to mark the rollback custom action with "don't check exit code".
I haven't used Wise in a while and don't know exactly where you find this in the GUI, but it shouldn't be that difficult. It is probably a flag you can set when you insert the custom action into the InstallExecuteSequence.
Secondly you would need to start debugging the actual content inside the custom action to determine where it crashes and obviously resolve the root of the problem before the rollback action will work properly. Sometimes it is sufficient to just use numbered message boxes to track the progress of the code in the custom action at runtime, but at other times you need to use the debugger feature to step through each line in the custom action code.

Resources