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

Re: git-p4: labels

From
Vitor Antunes <vitor.hda@gmail.com>
Date
Dec 20, 2011, 12:03 UTC
Message-ID
<CAOpHH-VUJBU5ygabw7YS_FHz6xMDtMkdWMNdH3Mnvp+Crbwh7Q@mail.gmail.com>
In-Reply-To
<20111220014753.GD20591@padd.com>
On Tue, Dec 20, 2011 at 1:47 AM, Pete Wyckoff <pw@padd.com> wrote:
> But adding a new command to go back and look for _new_ labels
> makes sense too.  Finding the new ones isn't so bad, given that
> p4 can just print them directly, and we keep them as tags in git.

Now that you say that, it is now very difficult to detect branches on an already imported repository. Maybe the new command could also do that? In this case I would call it "git-p4 resync".

Show 9 quoted lines
> [...]
> But isn't there a step in label detection that looks an awful lot
> like branch point detection?  You've got a label, which is a
> bunch of files, not a p4 change number.  Now you have to figure
> out the change number so you can go hunt that down in the git
> history.  Vitor's take on this was to use git diff machinery to
> find it, not trawling through the p4 change/filelog/describe
> history, mainly because it's likely much faster to do it locally
> in git.
In labels this is easier and fast:
p4 changes -m 1 @label_name

Then we could diff the label against the changelist. If equal simply tag the commit, if different then we need to create a temporary branch to commit the changes and tag that instead.

-- 
Vitor Antunes
Previous: Pete Wyckoff
Message 4 of 4 in “git-p4: labels”
  1. Luke DiamandDec 18, 2011
  2. Vitor AntunesDec 19, 2011
  3. Pete WyckoffDec 20, 2011
  4. Vitor AntunesDec 20, 2011

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.