salesforce / p4-fusion

A fast Perforce to Git conversion tool written in C++ using Perforce Helix Core C++ API and Libgit2
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

Add Tag Creation for Automatic Labels #60

Open groboclown opened 1 year ago

groboclown commented 1 year ago

As Perforce supports automatic labels, which are a view mapping + a revision marker, it's possible to map these to a Git tag under very limited criteria:

  1. The Label contains the field Revision with a value of @(integer)
  2. The Label contains a View with a path that fully contains the depot path being copied.
  3. The (integer) revision is a changelist that the transfer includes.

Because this label fully matches to a Git commit, a corresponding tag can be created off of the label.