1

I'm working on a tool which migrates from SVN to TFS using the TFS API.

workspace.CheckIn(
     pendingChanges,
     currentUser.TfsUser,
     set.LogMessage + " on " + String.Format("{0:d/M/yyyy HH:mm:ss}", set.TimeStamp) + " by " + currentUser.SvnUser,
     (CheckinNote)null,
     (WorkItemCheckinInfo[])null,
     (PolicyOverrideInfo)null
);

This is the way i check my revision in, but sometimes it ignores files like .svnExe, or other "unknown" file types.

Is there a way to check ALL filetypes in TFS?

Ryan Gates
  • 4,501
  • 6
  • 50
  • 90
a.schwab
  • 251
  • 1
  • 4
  • 15
  • 1
    Does pendingChanges contain the files you want to CheckIn? Which version of TFS are you using? If you add files to SourceControl in Visual Studio, it filters specific file types, like EXE and DLL, because they are **usually** the output and not necessary for development. Half-OffTopic: Do you plan to publish your tool somewhere? At the moment I just know one tool for SVN->TFS migration and that costs 2000€ per year, but it might be that I need to migrate a SVN in future ;) – MikeR Jan 29 '13 at 11:47

1 Answers1

1

There are two possibilities that I can think of:

Possibility 1: Something is causing the PendAdd() to fail.

For example, if the path already exists in Version Control, you have to use a PendEdit() instead.

To diagnose this possibility, you should subscribe to the VersionControlServer.NonFatalError event.

Possibility 2: You could have a corrupt workspace cache

You can refresh the cache by calling Workstation.Current.EnsureUpdateWorkspaceInfoCache() or by following the steps in this answer (run tf workspaces /collection:http://yourserver:8080/tfs/DefaultCollection, or delete the directories manually).

Community
  • 1
  • 1
granth
  • 8,919
  • 1
  • 43
  • 60