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

[PATCH 0/1] git-p4: add unshelve command

From
Luke Diamand <luke@diamand.org>
Date
Feb 22, 2018, 09:50 UTC
Message-ID
<20180222095022.6227-1-luke@diamand.org>

This is an initial attempt at adding an unshelve command to git-p4.

For those not familiar with it, p4 shelve creates a "pending" changelist, which isn't committed into the central repo but is nonetheless visible to other develoeprs. The "unshelve" command takes one of these pending changelists and applies it to your repo. It is used quite a lot for code review.

git-p4 learned about shelving changelists recently; this completes the picture by letting you unshelve them as well.

This was inspired by the stackoverflow answer here:
    https://stackoverflow.com/questions/41841917/git-p4-how-to-fetch-a-changelist

The secret is to use the "p4 print file@=N" syntax to get the contents of a shelved changelist, which has long perplexed me.

I haven't used this a great deal, so it may still have a few rough edges.

In particular, it currently puts the unshelved commit into
    refs/remotes/p4/unshelved/<N>

where <N> is the changelist being unshelved. That might not be the best way to do this.

Luke Diamand (1):
  git-p4: add unshelve command
 Documentation/git-p4.txt |  22 ++++++++
 git-p4.py                | 128 +++++++++++++++++++++++++++++++++++------------
 t/t9832-unshelve.sh      |  67 +++++++++++++++++++++++++
 3 files changed, 186 insertions(+), 31 deletions(-)
 create mode 100755 t/t9832-unshelve.sh
-- 
2.15.1.272.gc310869385
Next: Luke Diamand
Message 1 of 6 in “git-p4: add unshelve command”
  1. 0/1 git-p4: add unshelve commandLuke Diamand, Feb 22, 2018
  2. 1/1 git-p4: add unshelve commandLuke Diamand, Feb 22, 2018
  3. Miguel TorrojaFeb 22, 2018
  4. Luke DiamandFeb 22, 2018
  5. Luke DiamandFeb 23, 2018
  6. Miguel TorrojaFeb 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.