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

Re: git-p4 and keyword expansion

From
Tor Arvid Lund <torarvid@gmail.com>
Date
Sep 8, 2008, 08:27 UTC
Message-ID
<1a6be5fa0809080127h5db71093o364aade2fb955acc@mail.gmail.com>
In-Reply-To
<554296.48174.qm@web95003.mail.in2.yahoo.com>
Hi,
On Mon, Sep 8, 2008 at 6:25 AM, dhruva <dhruva@ymail.com> wrote:
> Hi,
>  The git-p4 script unexpands all p4 keywords before feeding it to git fastimport. When there is a new version, it records only the diffs minus the keyword contents at it unexpands and then feeds to fastimport. When trying to submit back to perforce, applying a patch on top of the latest file in p4 with the keyword expanded fails because we have not tracked that difference. Patch applying fails and expects you to manually (out of git) to do a 'p4 submit' and get back and do 'git-p4 submit --continue'.
>  Removing the keyword unexpanding code in 'git-p4' with the following patch makes it work:

Yes, I have also experienced this problem, and haven't yet come up with a solution to it. Your solution seems to solve the problem with submitting to p4, but it would also mean that files cloned from p4 would have diffs in the git database whenever the p4 headers changed. This does not seem nice to me. Are all the keyword expansions reproducable? I mean... could we store them in git as before (unexpanded), and make some logic to recreate them upon submitting to p4? That might work...

I think, at least, that although this is a nice initiative, we should find a nicer solution.

-Tor Arvid-
Previous: dhruvaNext: Tor Arvid Lund
Message 2 of 4 in “git-p4 and keyword expansion”
  1. dhruvaSep 8, 2008
  2. Tor Arvid LundSep 8, 2008
  3. Tor Arvid LundSep 8, 2008
  4. Jing XueSep 8, 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.