threads / discuss / 29575

git p4 submit bugs (submit fails due to keyword expansion mismatch and gives bad instructions for how to proceed)

Subject: git p4 submit bugs (submit fails due to keyword expansion mismatch and gives bad instructions for how to proceed)

## tl;dr

2 messages between Feb 8, 2012 and Feb 8, 2012.

replies: 1people: 2as markdown or json

Eric Scouten· Feb 8, 2012, 21:49 UTC · lore

I've been experimenting with git-p4 as a front-end to Perforce as described in http://www.perforce.com/blog/120113/git-perforce-client, but two bugs are causing me major headaches:

(1) git-p4 doesn't work with P4 keyword expansion. (I gather there's a fork of git-p4 that makes it work, but the current official distro doesn't.) This can lead to some ugly failed submits down the road. Which leads me to ...

(2) When a git p4 submit fails, the error message for how to resolve it is bogus. The instructions say "Please resolve and submit the conflict manually and continue afterwards with git-p4 submit --continue", but when I do that, I get:

$ git p4 submit --continue
Usage: git-p4 submit [options] [name of git branch to submit into
perforce depot]
git-p4: error: no such option: --continue
Ugh.

(P.S. If there's a better place to post bug reports, etc., please inform. Thanks.)

-Eric
Luke Diamand· Feb 8, 2012, 22:27 UTC · re: Eric Scouten · lore

Re: git p4 submit bugs (submit fails due to keyword expansion mismatch and gives bad instructions for how to proceed)

On 08/02/12 21:49, Eric Scouten wrote:
Show 8 quoted lines
> I've been experimenting with git-p4 as a front-end to Perforce as
> described in http://www.perforce.com/blog/120113/git-perforce-client,
> but two bugs are causing me major headaches:
>
> (1) git-p4 doesn't work with P4 keyword expansion. (I gather there's a
> fork of git-p4 that makes it work, but the current official distro
> doesn't.) This can lead to some ugly failed submits down the road.
> Which leads me to ...
Do you mean those awful $RCS$ keywords?

I had a go at creating some code that would cope, but in the end I'm afraid I gave up.

My strategy was to try the patch, if it failed, look for RCS keywords, and then zap them in the destination p4 file and then try the patch again.

It worked for some cases reasonably well (deletion is a bit trickier), but it failed horribly if anyone was crazy enough to copy a p4 file with expanded RCS keywords into the git repo. So at that point, I gave up in disgust and just wrote a pre-commit script to reject all changes involving $RCS$.

Basically, my feeling now is that RCS keywords are utterly bonkers, and anyone stupid enough to use them has probably got bigger problems than just git-p4 - I hope that's not you though :-)

Show 10 quoted lines
>
> (2) When a git p4 submit fails, the error message for how to resolve
> it is bogus. The instructions say "Please resolve and submit the
> conflict manually and continue afterwards with git-p4 submit
> --continue", but when I do that, I get:
>
> $ git p4 submit --continue
> Usage: git-p4 submit [options] [name of git branch to submit into
> perforce depot]
> git-p4: error: no such option: --continue
Yes, that _is_ annoying.
Show 11 quoted lines
>
> Ugh.
>
> (P.S. If there's a better place to post bug reports, etc., please
> inform. Thanks.)
>
> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

← back to recent threads