On Tue, 3 Apr 2012 08:38:35 +0100 Luke Diamand <luke@xxxxxxxxxxx> wrote: > 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-tags. > > Signed-off-by: Luke Diamand <luke@xxxxxxxxxxx> > --- > Documentation/git-p4.txt | 39 ++++++- > contrib/fast-import/git-p4 | 249 > ++++++++++++++++++++++++++++++++++------ t/t9811-git-p4-label-import.sh > | 145 +++++++++++++++++++++++ 3 files changed, 398 insertions(+), 35 > deletions(-) create mode 100755 t/t9811-git-p4-label-import.sh > Would it be possible to only export git tags during commit? I don't think it is intuitive to make changes in P4 during sync operation. And because it is possible to configure git-p4 to always export tags it will be easy to forget that while sync'ing we are also updating P4. I still did not test the patch in my branch environment, so I may have more updates later. But for now, everything else seems ok by me. Vitor -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html