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

[PATCHv1 0/3] git-p4: improved unshelving

From
Luke Diamand <luke@diamand.org>
Date
Oct 12, 2018, 05:28 UTC
Message-ID
<20181012052833.6945-1-luke@diamand.org>

This patch series teaches the git-p4 unshelve command to handle intervening changes to the Perforce files.

At the moment if you try to unshelve a file, and that file has been modified since the shelving, git-p4 refuses. That is so that it doesn't end up generating a commit containing deltas from several P4 changes.

This gets to be more annoying as time goes on and the files you are interested in get updated by other people.

However, what we can do is to create a parent commit matching the state of the tree when the shelve happened, which then lets git-p4 create a git commit containing just the changes that are wanted.

It's still impossible to determine the true state of the complete tree when the P4 shelve was created, since this information is not recorded by Perforce. Manual intervention is required to fix that.

There are also a few other smaller fixes, the main one being that it no longer unshelves into refs/remotes/p4/master/unshelved, but instead into refs/remotes/p4-unshelved.

That's because the git-p4 branch detection gets confused by branches appearing in refs/remotes/p4.

Luke Diamand (3):
  git-p4: do not fail in verbose mode for missing 'fileSize' key
  git-p4: unshelve into refs/remotes/p4-unshelved, not
    refs/remotes/p4/unshelved
  git-p4: fully support unshelving changelists
 Documentation/git-p4.txt | 10 ++---
 git-p4.py                | 90 +++++++++++++++++++++++-----------------
 t/t9832-unshelve.sh      | 75 ++++++++++++++++++++++++++-------
 3 files changed, 117 insertions(+), 58 deletions(-)
-- 
2.19.1.272.gf84b9b09d4
Next: Luke Diamand
Message 1 of 7 in “[PATCHv1 0/3] git-p4: improved unshelving”
  1. Luke DiamandOct 12, 2018
  2. 1/3 git-p4: do not fail in verbose mode for missing 'fileSize' keyLuke Diamand, Oct 12, 2018
  3. 2/3 git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelvedLuke Diamand, Oct 12, 2018
  4. Junio C HamanoOct 12, 2018
  5. Luke DiamandOct 12, 2018
  6. Luke DiamandOct 15, 2018
  7. 3/3 git-p4: fully support unshelving changelistsLuke Diamand, Oct 12, 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.