Skip to content

Latest commit

 

History

History
128 lines (107 loc) · 4.95 KB

localversions-command.md

File metadata and controls

128 lines (107 loc) · 4.95 KB
title titleSuffix description ms.assetid ms.prod ms.technology ms.manager ms.author author ms.topic ms.date monikerRange
LocalVersions Command
Azure Repos
LocalVersions Command
5531edc7-0333-43eb-bea0-59db9bc35c33
devops
devops-code-tfvc
jillfra
sdanie
steved0x
reference
08/10/2016
>= tfs-2015

LocalVersions Command

Azure Repos | TFS 2018 | TFS 2017 | TFS 2015 | VS 2017 | VS 2015 | VS 2013

Displays the version of one or more items in a workspace.

Required Permissions
To use the localversions command, you must have the Use permission to the workspace. For more information, see Permissions and groups reference.

tf localversions ItemSpec
[/recursive] [/format:brief|detailed]
[/workspace:WorkspaceName[;WorkspaceOwner]] [/collection:TeamProjectCollectionUrl]

Parameters

Argument

Description

Itemspec

Specify either a file or a folder that contains the files for which you want to display version numbers.

You can specify only a local file or folder. For example, c:\project1\binder.cs is valid, but $/project1/binder.cs is not.

Note
You can specify more than one Itemspec argument.

WorkSpaceName

Use this argument with the /workspace option to specify a workspace other than the one that is mapped to the current directory.

WorkSpaceOwner

Use this argument with the WorkSpaceName argument if you want to specify a public workspace.

TeamProjectCollectionUrl

The URL of the project collection that contains one or more items for which you want to display the version (for example, http://myserver:8080/tfs/DefaultCollection).

Option

Description

/format

Specify one of the following options to control how the data returned by this command appears:

  • Brief

    (Default.) Each directory appears only once, followed by the files that it contains.

  • Detailed

    Each file appears after its full path.

/recursive

Specify this option if you want the operation to include items in subfolders.

/workspace

Specify this option to display data about the versions of items that are in a workspace other than the one that is mapped to the current directory.

/collection

Specifies the project collection.

Remarks

When you get or check out a file, you usually download the most current version. However, you may have older versions of some files in your workspace.

For example, you might have checked out some files and not checked in your work for several weeks. Other people on your team may have checked in changes to the same files during that time. In this case, the versions of these files in your workspace would be older than the current versions on your server for Team Foundation version control. You can use the localversions command to get information about which versions of these files are in your workspace.

For information about other Team Foundation commands that provide additional information about items in your server for Team Foundation version control and the workspaces that map to it, see Informational Commands.

For more information about how to find and use the tf command-line utility, see Tf Command-Line Utility Commands.

Examples

The following example displays the version of the ControllerBase.cs file in the workspace that is mapped to the c:\\workspaces\\FeatureA\\catalog\\controller folder.

c:\workspaces\FeatureA\catalog\controller>tf localversions ControllerBase.cs

The following example displays the versions of all files (including those in subfolders) in the workspace that is mapped to the c:\\workspaces\\FeatureA\\catalog\\ folder. Because the /format:detailed option is specified, each file appears with its full path.

c:\workspaces\FeatureA\catalog\>tf localversions . /recursive /format:detailed

See Also

Concepts

Informational Commands

Other Resources

Tf Command-Line Utility Commands