From: Luke Diamand <luke@diamand.org>
To: Vitor Antunes <vitor.hda@gmail.com>
Cc: Pete Wyckoff <pw@padd.com>, git@vger.kernel.org
Subject: Re: [PATCHv1 2/2] git-p4: import/export of labels to/from p4
Date: Thu, 05 Apr 2012 07:54:43 +0100 [thread overview]
Message-ID: <4F7D41B3.7010202@diamand.org> (raw)
In-Reply-To: <20120403235247.02c85147@fenix.utopia.dhis.org>
On 03/04/12 23:52, Vitor Antunes wrote:
> On Tue, 3 Apr 2012 08:38:35 +0100
> Luke Diamand<luke@diamand.org> 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.
>>
<snip>
>>
>
> 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.
Commit isn't a great time to do it because you don't know the p4
changelist number for your git commits.
e.g.
git commit -m 'Some change'
git tag -a MYTAG -m 'whatever'
git-p4 submit [--export-tags]
======= the tag must be ignored here ========
======= as you don't know the p4 cl ========
git-p4 sync --export-tags
======= *Now* you know the p4 cl ========
So it either has to be part of sync/rebase, or we add a new command,
e.g. git-p4 export-tags (and presumably git-p4 import-tags). But that
seems awkward as well.
>
> 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.
>
Thanks,
Luke
prev parent reply other threads:[~2012-04-05 6:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 7:38 [PATCHv1] git-p4: label import, tag export Luke Diamand
2012-04-03 7:38 ` [PATCHv1 1/2] git-p4: fix t9800 editor check Luke Diamand
2012-04-03 7:38 ` [PATCHv1 2/2] git-p4: import/export of labels to/from p4 Luke Diamand
2012-04-03 22:52 ` Vitor Antunes
2012-04-05 6:54 ` Luke Diamand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F7D41B3.7010202@diamand.org \
--to=luke@diamand.org \
--cc=git@vger.kernel.org \
--cc=pw@padd.com \
--cc=vitor.hda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.