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

Re: [PATCHv2 0/3] git-p4: improved unshelving - small fixes

From
Luke Diamand <luke@diamand.org>
Date
Oct 24, 2018, 11:51 UTC
Message-ID
<CAE5ih7867GCao1NWDvmcaVnui5QUYf-uMfFNhH6Zh0zztMBhuA@mail.gmail.com>
In-Reply-To
<xmqqtvlm1pon.fsf@gitster-ct.c.googlers.com>
On Tue, 16 Oct 2018 at 05:27, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
>
> Luke Diamand <luke@diamand.org> writes:
>
> > This is the same as my earlier patch other than fixing the
> > documentation to reflect the change to the destination branch,
> > as noticed by Junio.
>
> Also you set up when-finished driver for clean-up before running
> clone, which I think is a good change, too.
>
> Will replace.  Thanks.

At the moment the parent commit file revisions are constructed by p4-printing the relevant files at the required version. That's because it's easy to do - I can just make use of the existing infrastructure for grabbing P4 changes.

However, in most cases we will already have these files present in the git repo - it's just that we don't know where. I think it ought to be possible to look at the revisions of each file, and then search through the git revision history for that file to find the magic comment marker that git-p4 inserts (which has the P4 changelist embedded in it) and then use that - rather than going back to the Perforce depot.

In most cases that ought to be quite a bit faster, especially for large files.

For now I'm not proposing to do this as it's quite a bit more work (this isn't really my day job!) and for the typical use case (at least the ones I encounter) the performance of unshelving isn't really that important - the fact that it does it at all is quite amazing.

But anyway, if someone somewhere finds that git-p4 unshelve performance is too slow, then that's the change to make.

Luke
Previous: Junio C Hamano
Message 6 of 6 in “[PATCHv2 0/3] git-p4: improved unshelving - small fixes”
  1. Luke DiamandOct 15, 2018
  2. 1/3 git-p4: do not fail in verbose mode for missing 'fileSize' keyLuke Diamand, Oct 15, 2018
  3. 2/3 git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelvedLuke Diamand, Oct 15, 2018
  4. 3/3 git-p4: fully support unshelving changelistsLuke Diamand, Oct 15, 2018
  5. Junio C HamanoOct 16, 2018
  6. Luke DiamandOct 24, 2018

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.