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

Re: [PATCHv3 0/1] git-p4 unshelve

From
Luke Diamand <luke@diamand.org>
Date
Jun 15, 2018, 22:03 UTC
Message-ID
<CAE5ih7_u+XrBCeozTORmQXFhBt_Gsh392E0n+yt8_PTz0A9Dxg@mail.gmail.com>
In-Reply-To
<20180515100129.1454-1-luke@diamand.org>
On 15 May 2018 at 11:01, Luke Diamand <luke@diamand.org> wrote:
Show 12 quoted lines
> This is a git-p4 unshelve command which detects when extra
> changes are going to be included, and refuses to unhshelve.
>
> As in my earlier unshelve change, this uses git fast-import
> to do the actual delta generation, but now checks to see
> if the files unshelved are based on the same revisions that
> fast-import will be using, using the revision numbers in
> the "p4 describe -S" command output. If they're different,
> it refuses to unshelve.
>
> That makes it safe to use, rather than potentially generating
> deltas that contain bits from other changes.

Having been using this, when it works it's great, and it's nice that it errors out rather than creating a garbled patch. But it would be really useful if it could somehow automatically build some kind of diff-base for fast-import to use.

Doing so is probably not that hard given that it already knows the versions that it wants for the error reports, but it's not completely trivial either. I think you'd need to get the list of base revisions you want, then hijack the P4Sync class to generate a commit via fast-import, then feed that to the next stage as the base commit. I think it would make sense to see if anyone other than me actually cares!

Luke
Previous: Luke Diamand
Message 3 of 3 in “[PATCHv3 0/1] git-p4 unshelve”
  1. Luke DiamandMay 15, 2018
  2. 1/1 git-p4: add unshelve commandLuke Diamand, May 15, 2018
  3. Luke DiamandJun 15, 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.