From: Jing Xue <jingxue@digizenstudio.com>
To: Gary Yang <garyyang6@yahoo.com>
Cc: git@vger.kernel.org
Subject: Re: git-p4 submit, Can't clobber writable file
Date: Wed, 3 Dec 2008 09:24:59 -0500 [thread overview]
Message-ID: <20081203142459.GC5624@jabba.hq.digizenstudio.com> (raw)
In-Reply-To: <410584.87710.qm@web37905.mail.mud.yahoo.com>
(Just a friendly reminder - I believe the convention on this list is "no
top-post.")
On Tue, Dec 02, 2008 at 10:04:20PM -0800, Gary Yang wrote:
>
> --- On Tue, 12/2/08, Jing Xue <jingxue@digizenstudio.com> wrote:
>
> > You might want to clone to a git working dir different than
> > the p4
> > working dir.
> >
> > For instance, if your p4 workspace has the working dir set
> > to
> > build_scripts/, try 'git p4 clone //build/scripts
> > build_scripts.git'.
> >
> > You would then normally work under build_scripts.git/.
> > build_scripts/
> > would only be used by git-p4 at submission time.
>
> So, I have to keep two copies of source tree at my home directory. One
> is for Perforce build_scripts workspace, another is for Git
> build_scripts.git. I normally work at build_scripts.git. But, when I
> need to submit changes to Perforce, I have to copy changed code from
> build_scripts.git to build_scripts.
You don't have to do that, not manually. That's git-p4's job. When you
do 'git p4 submit', it basically:
1. calls 'p4 sync' in the p4 working dir,
2. generates patches from p4/master..HEAD,
3. for each of the patches, applies it in the p4 working dir, and 'p4
submit' it as one changelist.
> Then, p4 submit code into
> Perforce. Is this the only way of using git-p4? Note: I cannot use
> git-p4 submit at build_scripts. It claims "Cannot clobber writable
> file". Is it a bug of git-p4 or the instruction is not correct?
Git-p4.txt does mention this (although briefly) in the "Submitting"
section:
"git-p4 has support for submitting changes from a git repository back to the
Perforce depot. This requires a Perforce checkout separate from your git
repository..."
Cheers.
--
Jing Xue
prev parent reply other threads:[~2008-12-03 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 22:30 git-p4 submit, Can't clobber writable file Gary Yang
2008-12-02 23:51 ` Reece Dunn
2008-12-03 0:14 ` Gary Yang
2008-12-03 3:07 ` Jing Xue
2008-12-03 6:04 ` Gary Yang
2008-12-03 11:07 ` Arafangion
2008-12-03 19:06 ` Gary Yang
2008-12-03 14:24 ` Jing Xue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081203142459.GC5624@jabba.hq.digizenstudio.com \
--to=jingxue@digizenstudio.com \
--cc=garyyang6@yahoo.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).