---
name: "VCP::Filter::addlabels"
section: "3pm"
platform: "linux"
package: "libvcp-perl"
version: "0.9-20050110-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/VCP::Filter::addlabels"
---

# VCP::Filter::addlabels(3pm)

Add labels to each revision

## NAME

VCP::Filter::addlabels - Add labels to each revision

## SYNOPSIS

```
  ## From the command line:
   vcp <source> addlabels: "rev_$rev_id" "change_$change_id" -- <dest>
```

```
  ## In a .vcp file:
```

```
    AddLabels:
            rev_$rev_id
            change_$change_id
            # ... etc ...
```

## DESCRIPTION

Used when you want to track the original rev\_id, change\_id, branch\_id, etc. each revision had in the source repository by adding a label. Can be used to turn any piece of metadata in to a label.

Note that the fields

```
    source_name, source_filebranch_id, source_branch_id,
    source_rev_id, source_change_id
```

are set by VCP to be the same value as the corresponding fields without the source prefix (except source\_filebranch\_id, which is built from the file name, rooted in the repository, and for cvs repositories, the branch number in angle brackets.)  These source\_\* fields (intended to be immutable in vcp) should be used to make labels rather than their mutable equivalents which may be changed via a vcp filter.

There is no way to add labels only to selected revisions at this time, but if you try to add a label for metadata that is undefined or empty, it will not be added.

## AUTHOR

Barrie Slaymaker \<barries@slaysys.com\>

## COPYRIGHT

Copyright (c) 2000, 2001, 2002 Perforce Software, Inc. All rights reserved.

See VCP::License (`"vcp help license"`) for the terms of use.
