แก้ไข

แชร์ผ่าน


Merges command (Team Foundation Version Control)

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Visual Studio 2019 | Visual Studio 2022

The tf merges command displays detailed information about past merges between the specified source and destination branches in Team Foundation Version Control (TFVC).

Prerequisites

To use the merges command, you must have the Read permission set to Allow for both source and destination branches. For more information, see Default TFVC permissions.

Syntax

tf merges [source] destination [/recursive] [/extended] [/format:(brief|detailed)] [/login:username, [password]] [/showall]]] [/collection:TeamProjectCollectionUrl]

Parameters

Arguments

Argument

Description

<source>

Filters the merge history to include only entries with the specified sources.

This parameter is optional.

<destination>

Specifies the destination branch for which merge history is displayed.

This parameter is required.

<username>

Provides a value to the /login option. You can specify a username value as either DOMAIN\username or username.

<TeamProjectCollectionUrl>

The URL of the project collection that contains the branches about which you want to display the merge history, for example http://myserver:8080/tfs/DefaultCollection.

Options

Option

Description

/recursive

Displays information for all merges in the specified TFVC server folder and its subfolders.

/extended

Displays a list of merges for a specific range of target items, for example tf merges tgt\file1.txt; C21-25. This option displays the types of merges, for example add or edit, and detailed information about the source and target items. This option implies /format: Detailed.

Note

You can't use this option if you specify a source item.

/format

Specifies the formats in which merge history can appear:

  • Brief (default): Shows the changeset numbers for both the source and target items and the author and the date of the target checkin.
  • Detailed: Shows the detailed paths and changeset numbers for both the source and target items.

/login

Specifies the user name and password to authenticate the user with Azure DevOps.

/showall

Displays all past merges for a given target item under its current name and all previously used names.

/collection

Specifies the project collection.

Remarks

For more information on how to use the tf command-line utility, see Use Team Foundation version control commands.

Examples

The following example displays information about all merge operations done between the Beta1_branch and the RTM_branch.

c:\projects>tf merges /recursive Beta1_branch RTM_branch

Sample output:

Changeset  Merged in Changeset   Author   Date
--------------------------------------------------------
135         162                   Justin     10/31/2003
146         162                   Justin      10/31/2003
147*        167                   Bill       11/02/2003

The asterisk * next to changeset 147 indicates that only some of the changes in that changeset #147 were merged into changeset #167.