summaryrefslogtreecommitdiff
path: root/t/t9811-git-p4-label-import.sh
AgeCommit message (Collapse)AuthorFilesLines
2015-08-28git-p4: fix P4 label import for unprocessed commitsLibravatar Luke Diamand1-1/+1
With --detect-labels enabled, git-p4 will try to create tags using git fast-import by writing a "tag" clause to the fast-import stream. If the commit that the tag references has not yet actually been processed by fast-import, then the tag can't be created and git-p4 fails to import the P4 label. Teach git-p4 to use fast-import "marks" when creating tags which reference commits created during the current run of the program. Commits created before the current run are still referenced in the old way using a normal git commit. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-28git-p4: failing test for ignoring invalid p4 labelsLibravatar Luke Diamand1-0/+45
When importing a label which references a commit that git-p4 does not know about, git-p4 should skip it and go on to process other labels that can be imported. Instead it crashes when attempting to find the missing commit in the git history. This test demonstrates the problem. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11git p4: add test for tag import/export enabled via configLibravatar Luke Diamand1-0/+20
This adds a test for git p4 to check it can import/export tags when enabled via a config variable rather than on the command line. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24git p4: fix-up "import/export of labels to/from p4"Libravatar Luke Diamand1-2/+2
The previous one is already in 'next' but was somewhat lacking. The configuration "git-p4.validLabelRegexp" is now called "labelExportRegexp", and its default covers lowercase alphabets as well. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-11git p4: import/export of labels to/from p4Libravatar Luke Diamand1-0/+202
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>