Borland Starteam incorrect files status - starteam

I have some project saved in starteam. As there are a lot of obsolete files I can't check in or check out all project, only changed files. Now I copy project from one computer to another for other developer. I expect starteam treats copied project as new item for check in and check out, but it don't.
Forexample:
I modified file on first computer.
I update list of files on second computer and see this file in "check in" list, as I modified it on second computer.
It is incorrect.
I think there is some configuration file or something like, that saves computer (or user) settings. So when project is copied, settings is copied too.
Do anybody know how to change this configuration to set copied project as new instance of starteam???

You should be able to Right-Click on either the file or a close group of files (such as the Modified group) on the file tab within a project and choose the Update Status option. This will cause StarTeam to analyze the file to try to determine if they truly are the same as what is in source control. Then you can refresh the list and it should change most of your files to current.
There is also a configuration setting under Tools->Personal Options->File tab that is "Use file checksums (MD5) to calculate status". This may be useful to you as a different way to have StarTeam determine if the file on your local disk is the same as what is in source control.

It sounds like you are using a custom filter/query for your check-in list. The status for the files that are copied/moved would be "unknown" and they can still be checked-in by checking the "force check-in" checkbox in the check-in dialog. Just verify that the local version is correct by using compare contents before committing it.
You can try switching from a central file status repository to a "per folder" repository. This will create .sbas folders wherever you check-out files and should maintain status for local files when their containing folder is copied or moved. Look under Tools, Personal Options on the File tab under Repository.

Related

Visual Studio 2017 - moved local TFS workspace folders - best/correct process to re-connect?

Had to move my directories for the local workspaces for Visual Studio. I updated the directory locations in VS, but it acted as if they were completely out of sync, and asked to get latest.
I let it do so for one project - it (re)downloaded everything, came up with a list of files to which I had local changes, listing them as conflicts. I kept the local version of all the files, so no work was lost. But when I opened the project, those files came up as not being in source control, and it offered to let me add them. So again, I have all my work, but that's a tedious process to re-connect everything. Not to mention that I'm not sure I caught ALL the files that needed re-adding.
I've also considered copying everything to other directories, download a clean copy of the project(s), doing a compare and folding in my changes. Still messy, but possibly safer.
Is there a far better way to do this practice that I've missed? Perhaps as a side question, is there an easy way to list all the files in a project not in source control?
Guess you moved/changed local TFS workspace folders in file system directly. This caused some folders/sub-folders/files lost mapping.
In other words, all of these folders already out of source control. That's why you need to re-add or re-connect them to TFS source control.
A right way please refer how to move an item in TFVC:
You can use Source Control Explorer to move one file or folder at a
time. You should not use Source Control Explorer to move folders or
files that are referenced by a Visual Studio project or solution. Move
these files with Solution Explorer instead and check in the move in a
new changeset.
In Source Control Explorer, select the item that you want to move,
open its shortcut menu, and choose Move.
In the Move dialog box, either manually type the destination for the
item in the To box, or choose Browse to use the Browse for Folder
dialog box.
Choose OK.
Move is actually a delete and re-add process. You could also take a look at this similar question here: Moving project (under source control) to different folder
In your situation, a quick way to solve the conflicts should be: First back up your local files, delete your old workspace, create a totally new workspace. Get latest version from sever side to your new workspace.
Then copy your back-up files/folders which copied from old workspace folder to the new one. Windows system will judge to replace files and add new files.(It may take some time) After this, TFS system will auto detect the changes in local and will list them as new pending changes. Some new add files maybe stay in the Excluded list, manually promote them in Included list.
Finally check in all your pending changes, everything should get back on track.

How to add to visual studio solution a file that exists in TFS?

I've deleted a file by accident. Then I created another file with the same name. When I tried to check in the change, it didn't work out and got an error. I undid the changes then deleted the file, there's no more error when I try to check in.
I'd like now to get the latest version of the file before I deleted it.
Thanks for helping.
In TFS, a deletion only takes effect when you check in the said deletion change, and thankfully, this operation is reversible.
Here are the most common recovery scenarios, assuming that the file already had revisions stored in TFS before the accidental deletion:
If the file is still visible in the Source Control Explorer and is marked for deletion (under the Pending Change column):
Then it means that you've deleted the file from your solution (and file system), but that you didn't checked in the changes yet.
Use the "Undo" command of its contextual menu to restore the file in your workspace to its latest version before deletion.
From there, you'll be able to add the restored file to your solution.
If the file is still visible in the Source Control Explorer and is not marked for deletion:
Then it means that you've deleted the file from your file system.
Use the "Get Specific Version" command of the file's contextual menu to restore it in your workspace. In the "Get" window, select "Latest Version" and enable both options.
From there, you'll be able to add the restored file to your solution.
If the file is not visible in the Source Control Explorer:
Then it means that you've checked in the deletion change.
Turn on the "View deleted files" option of the Source Control Explorer (usually the 2nd button of its toolbar) to see your deleted file.
Use the "Undelete" command of the file's contextual menu to restore it in your workspace.
From there, you'll be able to add the restored file to your solution and you'll eventually have to check in the undeleted file to make it available to others, since this file only exists in your workspace.

TortoiseSVN - "Save Form As" command in VB6 doesn't open any menu

I started working on a legacy software that uses Visual Basic 6 with TortoiseSVN on Windows.
When I work from the trunk, I am able to use the "Save Form As" contextual menu command to duplicate a form.
When doing the same when working on a branch, the command does not have any effect.
I have tried moving the project directory to the SVN ignore list.
I have also tried to take it out of source control all together.
I created a new repository and checked out the code. From this new repository, I could not copy a form in either the trunk or the branch.
I still cannot copy an existing form.
This tells me there might be an issue with file access permissions.
Sometimes .frm files have an accompanying .frx file (a binary file). Check whether this file is read-write. You may need to lock it in SVN. Since it is a binary file, the recommended practise is to mark it as needs-lock in SVN. VB6 sometimes fails to show helpful error messages if the .frm is read-write but the .frx is read-only.

What happened to Exclude from Source Control

I remember that in the past I was able to Exclude selected files from Source Control. But now this is missing:
How do I get it back. I want to exclude permanently, for example the photos folder.
This feature can now be found in the Pending Changes window:
You must first undo any pending changes on this item if there are any.
And you can specify a .tfignore in your source control system to make TFS automatically ignore files (the above mentioned dialog will create or update this file through the UI)

TFS - Latest field still showing "Yes" after deleting local files

In TFS Source Control Explorer my items are marked "Yes" in Latest field even though I have deleted all my local files. Is there a way to reevaluate that column so it shows "Not Downloaded" again?
Here is the solution if you want to delete your files from your local file system (using Windows Explorer for example) and change the column “Latest” in the Source Control Explorer from “Yes” to “Not downloaded”.
Go to “Get Specific Version…” on the files and select Changeset 1.
Changeset 1 is a special changeset on your TFS instance. If you do a get for changeset 1 on any actual files then they will not exist at that point in time on the system so will be deleted locally and the server will know this.
Link with the info: Removing source control files from your local file system
You should change the scope of your workspace to reflect what you do want locally.
You can also use the Cloak option to prevent sub folders.
https://msdn.microsoft.com/en-us/library/ms181378.aspx#mappings
You should never delete files locally when using a server workspace. If you use a local workspace TFS will lend delete those files from source.
Source Control Explorer reflects actions you performed to TFS instead of local file system. Please treat them separately. Visual Studio tries to keep them in sync, but it doesn't prevent you from deleting files directly.
Use tf get <files> /Force to re-get files you just deleted.

Resources