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

From: Luke Diamand <[email-masked]>
Date: Wed, 08 Feb 2012 22:27:29 +0000

On 08/02/12 21:49, Eric Scouten wrote:
> 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 :-)

>
> (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.

>
> 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 [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html