git p4: import/export of labels to/from p4
commit06804c76e8f7a61c7c9473decdf9b210d3238e9d
authorLuke Diamand <luke@diamand.org>
Wed, 11 Apr 2012 15:21:24 +0000 (11 17:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Apr 2012 18:04:53 +0000 (11 11:04 -0700)
tree29aac73bce738cbd42fda4ae8c36b9894d1d86c4
parent7bbaf11f356c7ae731ed33e157f1fbe1a75aa6f0
git p4: import/export of labels to/from p4

The existing label import code looks at each commit being
imported, and then checks for labels at that commit. This
doesn't work in the real world though because it will drop
labels applied on changelists that have already been imported,
a common pattern.

This change adds a new --import-labels option. With this option,
at the end of the sync, git p4 gets sets of labels in p4 and git,
and then creates a git tag for each missing p4 label.

This means that tags created on older changelists are
still imported.

Tags that could not be imported are added to an ignore
list.

The same sets of git and p4 tags and labels can also be used to
derive a list of git tags to export to p4. This is enabled with
--export-labels in 'git p4 submit'.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-p4.txt
git-p4.py
t/t9811-git-p4-label-import.sh [new file with mode: 0755]