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

[PATCH 0/1] git-p4: update multiple shelved change lists

From
Luke Diamand <luke@diamand.org>
Date
Dec 21, 2017, 11:06 UTC
Message-ID
<20171221110614.29300-1-luke@diamand.org>

This change lets you update several P4 changelists in sequence. Say you have several git commits which are all somehow related. You would start by shelving them (e.g. for a review), something like this:

 git p4 submit --origin HEAD^2 --shelve

You then make changes to these commits (in git) and now need to re-shelve them. Before this change you would need to cherry-pick each change onto a clean branch and do "git p4 --update-shelve", then remove the tip and repeat.

With this change, you can just do:
 git p4 submit --origin HEAD^2 --update-shelve $CL1 --update-shelve $CL2

If the shelved changelists overlap (one changelist touches the same line as another) then this won't work, but that problem already exists with the --shelve option. Solving that is pretty hard to do as P4 really only understands files, not changes. Despite this shortcoming, it's very useful to be able to do update shelved changelists like this.

Luke Diamand (1):
  git-p4: update multiple shelved change lists
 Documentation/git-p4.txt |  8 +++++++-
 git-p4.py                | 41 ++++++++++++++++++++++++++---------------
 t/t9807-git-p4-submit.sh | 24 ++++++++++++++----------
 3 files changed, 47 insertions(+), 26 deletions(-)
-- 
2.15.0.276.g89ea799.dirty
Next: Luke Diamand
Message 1 of 2 in “git-p4: update multiple shelved change lists”
  1. 0/1 git-p4: update multiple shelved change listsLuke Diamand, Dec 21, 2017
  2. 1/1 git-p4: update multiple shelved change listsLuke Diamand, Dec 21, 2017

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.