views:

49

answers:

3

Hi. I have just started using TFS and have some questions about hotkeys. It is really uncomfortable to select projects, solutions and files in Solution Explorer.

I want to assign hotkeys to just 2 operations:

  • Solution-wide checkin
  • Solution-wide get latest version

But I cant find these in the list of available operations in Visual Studio Keyboard Settings. Can someone help me with the names of operations if they are available?

A: 

Not feasible, unless you only run very little of TFS 2010.

TFS 2010 when properly used requires a lot more than just checking in - including attaching your checkin to the work items that it is realted to. A hotkey would make this impossible. In TFS you do not check in THAT often, only to complete items of work (or if they are very long sometimes on the site). I do about 4-5 checking per day and they CAN take time (integration, validation, documentation), so a hotkey would bring me nothing.

TomTom
Do you think that in SVN commits are more frequent then in TFS? But Visual Svn provides easy interface for it...
Sly
How is a checkin in TFS different from one in SVN? You can choose to have different workflows, but there's nothing whatsoever that would enforce this. And the question was not about your personal working style...
Thomas Weller
Question was just about the ability to assign hotkeys. And you are right - Its Not About Style Of Working.
Sly
It is different becauseT TFS does a lot more. If you only ue the SVN equivalent htat is like asking how a fiat panda is different from a sports car. If you use TFS then you have to do a lot more on checkin than just checking in files, but the project quality goes up a lot with it.
TomTom
@TomTom. TFS as a whole does a lot more, because it is an ALM server with integrated source control. But I still don't get how _TFS Source Control_ is different...
Thomas Weller
Well, then try the higher functions alone in source control - shelving, gated checkin. Make one click checkin a little useless. PLUS - very few people will use TFS SOURCE CONTROL. As in: nothing else. That is one thing: wasted money.
TomTom
Shelving is nothing but a private branch without all the versioning options. It's only a simple file backup. And gated checkins require a build server, which has nothing to do with source control in the first place. And btw.: _Many_ dev shps use only the SC part of TFS, because the rest of TFS doesn't fit their needs or is simply overkill...
Thomas Weller
+2  A: 

Actually, there are a whole bunch of commands available under Tools|Options|Environment|Keyboard, to which you can assign shortcuts. Some of them are:

  • File.TfsCheckIn
  • File.TfsCheckInSilent
  • TfsCheckInDynamicSilent
  • ...

I can't tell you exactly what is what and what is best for you to use. I guess there's some documentation about this out there - at least I hope so ;-)...

HTH!
Thomas

Thomas Weller
They are File specific, I'm looking for solution-wide. I don't want to bother on which file I'm on and commit only it. :( I've tried to google it with no luck, thats why question is here :)
Sly
Hmm. If that's the case, I don't have any other idea. Maybe you can get an answer if you post to one of the official MSDN forums, which are supported by MS staff. Usually they answer reasonably promptly...
Thomas Weller
I am using a hotkey for File.TfsCheckIn. File.TfsCheckIn is context specific. If you select a single file in the solution explorer it will check-in only that file but if you select the solution node in the solution explorer it will check-in everything below it. The same goes for folders in the Source Control Explorer.
Martin Hyldahl
+1  A: 

If you can't live with selecting the solution node in the solution explorer and use a hotkey for File.TfsCheckIn, I guess that your only options is to use a macro like this and assign a hotkey for that:

Sub CheckInSolution()
    DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate()

    Dim fi As System.IO.FileInfo = New System.IO.FileInfo(DTE.Solution.FullName)
    Dim name As String = fi.Name.Substring(0, fi.Name.Length - fi.Extension.Length)

    DTE.ActiveWindow.Object.GetItem(name).Select(vsUISelectionType.vsUISelectionTypeSelect)
    DTE.ExecuteCommand("ClassViewContextMenus.ClassViewProject.TfsContextCheckIn")
End Sub
Martin Hyldahl