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

Re: [PATCH] Optional shrinking of RCS keywords in git-p4

From
JXJing Xue <jingxue@digizenstudio.com>
Date
Sep 16, 2008, 12:58 UTC
Message-ID
<20080916125856.GB3069@jabba.hq.digizenstudio.com>
In-Reply-To
<20080916041201.GA25033@linode.davidb.org>
On Mon, Sep 15, 2008 at 09:12:01PM -0700, David Brown wrote:
Show 13 quoted lines
> A simple way to be paranoid would be something (shell-ish) like:
>
>   p4 print filename | collapse-keywords | git hash-object --stdin
>
> and make sure that is the version we think the file should have
> started with.  I think we're really just making sure we didn't miss a
> P4 change that someone else made underneath, and we're about to back
> out.
> Even this isn't robust from p4's point of view.  The p4 model is to do
> a 'p4 edit' on the file, and then the later 'p4 submit' will give an
> error if someone else has updated the file.  This would require using
> p4's conflict resolution, and I'm guessing someone using git-p4 would
> rather abort the submit and rebase.

How about collapsing the keywords in the _p4_ version after "p4 edit" but before applying the patch, and just "p4 submit" the collapsed version if patching succeeds? As pointed out earlier in this thread, p4 submit doesn't care about whether keywords are expanded or not anyway.

Cheers.
-- 
Jing Xue
Previous: David BrownNext: Daniel Barkalow
Message 7 of 9 in “Re: [PATCH] Optional shrinking of RCS keywords in git-p4”
  1. dhruvaSep 15, 2008
  2. David BrownSep 15, 2008
  3. Junio C HamanoSep 15, 2008
  4. Tor Arvid LundSep 15, 2008
  5. Daniel BarkalowSep 15, 2008
  6. David BrownSep 16, 2008
  7. Jing XueSep 16, 2008
  8. Daniel BarkalowSep 16, 2008
  9. Daniel BarkalowSep 16, 2008

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.