git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv1 2/2] git-p4: import/export of labels to/from p4

From
Vitor Antunes <vitor.hda@gmail.com>
Date
Apr 3, 2012, 22:52 UTC
Message-ID
<20120403235247.02c85147@fenix.utopia.dhis.org>
In-Reply-To
<1333438715-14902-3-git-send-email-luke@diamand.org>

On Tue, 3 Apr 2012 08:38:35 +0100 Luke Diamand <luke@diamand.org> wrote:

Show 28 quoted lines
> 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@diamand.org>
> ---
>  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
Previous: Luke DiamandNext: Luke Diamand
Message 4 of 5 in “[PATCHv1] git-p4: label import, tag export”
  1. Luke DiamandApr 3, 2012
  2. 1/2 git-p4: fix t9800 editor checkLuke Diamand, Apr 3, 2012
  3. 2/2 git-p4: import/export of labels to/from p4Luke Diamand, Apr 3, 2012
  4. Vitor AntunesApr 3, 2012
  5. Luke DiamandApr 5, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.