* git-p4 submit, Can't clobber writable file
@ 2008-12-02 22:30 Gary Yang
2008-12-02 23:51 ` Reece Dunn
2008-12-03 3:07 ` Jing Xue
0 siblings, 2 replies; 8+ messages in thread
From: Gary Yang @ 2008-12-02 22:30 UTC (permalink / raw)
To: git
I followed the instructions at http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
But, I am not able to git-p4 submit. Any idea?
git-p4 clone //build/scripts build_scripts
cd build_scripts
vi foo.h
git commit foo.h
git-p4 rebase
git-p4 submit
from sets import Set;
Perforce checkout for depot path //build/scripts/ located at /home/gyang/workspace/build_scripts/
Syncronizing p4 checkout...
//build/scripts/foo.h#1 - added as /home/gyang/workspace/build_scripts/foo.h
Can't clobber writable file /home/gyang/workspace/build_scripts/foo.h
//build/scripts/foo.c#1 - added as /home/gyang/workspace/build_scripts/foo.c
Can't clobber writable file /user/home/gyang/workspace/build_scripts/foo.c
......
command failed: p4 sync ...
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
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
1 sibling, 1 reply; 8+ messages in thread
From: Reece Dunn @ 2008-12-02 23:51 UTC (permalink / raw)
To: garyyang6; +Cc: git
2008/12/2 Gary Yang <garyyang6@yahoo.com>:
>
> I followed the instructions at http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
>
> But, I am not able to git-p4 submit. Any idea?
>
> git-p4 clone //build/scripts build_scripts
> cd build_scripts
> vi foo.h
> git commit foo.h
> git-p4 rebase
> git-p4 submit
>
> from sets import Set;
> Perforce checkout for depot path //build/scripts/ located at /home/gyang/workspace/build_scripts/
> Syncronizing p4 checkout...
This will be running a `p4 sync ...` command to ensure that the files
are up-to-date.
> //build/scripts/foo.h#1 - added as /home/gyang/workspace/build_scripts/foo.h
> Can't clobber writable file /home/gyang/workspace/build_scripts/foo.h
> //build/scripts/foo.c#1 - added as /home/gyang/workspace/build_scripts/foo.c
> Can't clobber writable file /user/home/gyang/workspace/build_scripts/foo.c
> ......
> command failed: p4 sync ...
Perforce will mark files as readonly when it does a checkout. When you
use `p4 edit` to say you have made changes to the file, Perforce
removes the readonly bit.
What is happening here is that the sync (checkout) command is trying
to write foo.h/c to your build_scripts directory, but because they
already exist there *and* are not readonly, Perforce is producing that
error as it does not want to overwrite any files that have changed
locally.
Not sure what is happening on the git-p4 side, though.
- Reece
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
2008-12-02 23:51 ` Reece Dunn
@ 2008-12-03 0:14 ` Gary Yang
0 siblings, 0 replies; 8+ messages in thread
From: Gary Yang @ 2008-12-03 0:14 UTC (permalink / raw)
To: Reece Dunn; +Cc: git
Reece,
I understand your explanation. But, git-p4 submit does not work for me. Are you able to re-produce the problem?
Thanks,
Gary
--- On Tue, 12/2/08, Reece Dunn <msclrhd@googlemail.com> wrote:
> From: Reece Dunn <msclrhd@googlemail.com>
> Subject: Re: git-p4 submit, Can't clobber writable file
> To: garyyang6@yahoo.com
> Cc: git@vger.kernel.org
> Date: Tuesday, December 2, 2008, 3:51 PM
> 2008/12/2 Gary Yang <garyyang6@yahoo.com>:
> >
> > I followed the instructions at
> http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
> >
> > But, I am not able to git-p4 submit. Any idea?
> >
> > git-p4 clone //build/scripts build_scripts
> > cd build_scripts
> > vi foo.h
> > git commit foo.h
> > git-p4 rebase
> > git-p4 submit
> >
> > from sets import Set;
> > Perforce checkout for depot path //build/scripts/
> located at /home/gyang/workspace/build_scripts/
> > Syncronizing p4 checkout...
>
> This will be running a `p4 sync ...` command to ensure that
> the files
> are up-to-date.
>
> > //build/scripts/foo.h#1 - added as
> /home/gyang/workspace/build_scripts/foo.h
> > Can't clobber writable file
> /home/gyang/workspace/build_scripts/foo.h
> > //build/scripts/foo.c#1 - added as
> /home/gyang/workspace/build_scripts/foo.c
> > Can't clobber writable file
> /user/home/gyang/workspace/build_scripts/foo.c
> > ......
> > command failed: p4 sync ...
>
> Perforce will mark files as readonly when it does a
> checkout. When you
> use `p4 edit` to say you have made changes to the file,
> Perforce
> removes the readonly bit.
>
> What is happening here is that the sync (checkout) command
> is trying
> to write foo.h/c to your build_scripts directory, but
> because they
> already exist there *and* are not readonly, Perforce is
> producing that
> error as it does not want to overwrite any files that have
> changed
> locally.
>
> Not sure what is happening on the git-p4 side, though.
>
> - Reece
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
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 3:07 ` Jing Xue
2008-12-03 6:04 ` Gary Yang
1 sibling, 1 reply; 8+ messages in thread
From: Jing Xue @ 2008-12-03 3:07 UTC (permalink / raw)
To: Gary Yang; +Cc: git
On Tue, Dec 02, 2008 at 02:30:51PM -0800, Gary Yang wrote:
>
> I followed the instructions at http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
>
> But, I am not able to git-p4 submit. Any idea?
>
> git-p4 clone //build/scripts build_scripts
> cd build_scripts
> vi foo.h
> git commit foo.h
> git-p4 rebase
> git-p4 submit
>
> from sets import Set;
> Perforce checkout for depot path //build/scripts/ located at /home/gyang/workspace/build_scripts/
> Syncronizing p4 checkout...
> //build/scripts/foo.h#1 - added as /home/gyang/workspace/build_scripts/foo.h
> Can't clobber writable file /home/gyang/workspace/build_scripts/foo.h
> //build/scripts/foo.c#1 - added as /home/gyang/workspace/build_scripts/foo.c
> Can't clobber writable file /user/home/gyang/workspace/build_scripts/foo.c
> ......
> command failed: p4 sync ...
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.
Cheers.
--
Jing Xue
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
2008-12-03 3:07 ` Jing Xue
@ 2008-12-03 6:04 ` Gary Yang
2008-12-03 11:07 ` Arafangion
2008-12-03 14:24 ` Jing Xue
0 siblings, 2 replies; 8+ messages in thread
From: Gary Yang @ 2008-12-03 6:04 UTC (permalink / raw)
To: Jing Xue; +Cc: git
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. 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?
--- On Tue, 12/2/08, Jing Xue <jingxue@digizenstudio.com> wrote:
> From: Jing Xue <jingxue@digizenstudio.com>
> Subject: Re: git-p4 submit, Can't clobber writable file
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Tuesday, December 2, 2008, 7:07 PM
> On Tue, Dec 02, 2008 at 02:30:51PM -0800, Gary Yang wrote:
> >
> > I followed the instructions at
> http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
> >
> > But, I am not able to git-p4 submit. Any idea?
> >
> > git-p4 clone //build/scripts build_scripts
> > cd build_scripts
> > vi foo.h
> > git commit foo.h
> > git-p4 rebase
> > git-p4 submit
> >
> > from sets import Set;
> > Perforce checkout for depot path //build/scripts/
> located at /home/gyang/workspace/build_scripts/
> > Syncronizing p4 checkout...
> > //build/scripts/foo.h#1 - added as
> /home/gyang/workspace/build_scripts/foo.h
> > Can't clobber writable file
> /home/gyang/workspace/build_scripts/foo.h
> > //build/scripts/foo.c#1 - added as
> /home/gyang/workspace/build_scripts/foo.c
> > Can't clobber writable file
> /user/home/gyang/workspace/build_scripts/foo.c
> > ......
> > command failed: p4 sync ...
>
> 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.
>
> Cheers.
> --
> Jing Xue
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
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
1 sibling, 1 reply; 8+ messages in thread
From: Arafangion @ 2008-12-03 11:07 UTC (permalink / raw)
To: garyyang6; +Cc: Jing Xue, git
I would argue that's a bug with git-p4, however that is a warning given
by perforce, thus, you should be able to work around it by changing the
clientspec, change the clientspec so that it will clobber such files,
you will need to refer to the perforce docs for info about that.
On Tue, 2008-12-02 at 22:04 -0800, Gary Yang wrote:
> 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. 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?
>
>
> --- On Tue, 12/2/08, Jing Xue <jingxue@digizenstudio.com> wrote:
>
> > From: Jing Xue <jingxue@digizenstudio.com>
> > Subject: Re: git-p4 submit, Can't clobber writable file
> > To: "Gary Yang" <garyyang6@yahoo.com>
> > Cc: git@vger.kernel.org
> > Date: Tuesday, December 2, 2008, 7:07 PM
> > On Tue, Dec 02, 2008 at 02:30:51PM -0800, Gary Yang wrote:
> > >
> > > I followed the instructions at
> > http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
> > >
> > > But, I am not able to git-p4 submit. Any idea?
> > >
> > > git-p4 clone //build/scripts build_scripts
> > > cd build_scripts
> > > vi foo.h
> > > git commit foo.h
> > > git-p4 rebase
> > > git-p4 submit
> > >
> > > from sets import Set;
> > > Perforce checkout for depot path //build/scripts/
> > located at /home/gyang/workspace/build_scripts/
> > > Syncronizing p4 checkout...
> > > //build/scripts/foo.h#1 - added as
> > /home/gyang/workspace/build_scripts/foo.h
> > > Can't clobber writable file
> > /home/gyang/workspace/build_scripts/foo.h
> > > //build/scripts/foo.c#1 - added as
> > /home/gyang/workspace/build_scripts/foo.c
> > > Can't clobber writable file
> > /user/home/gyang/workspace/build_scripts/foo.c
> > > ......
> > > command failed: p4 sync ...
> >
> > 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.
> >
> > Cheers.
> > --
> > Jing Xue
>
>
>
> --
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
2008-12-03 6:04 ` Gary Yang
2008-12-03 11:07 ` Arafangion
@ 2008-12-03 14:24 ` Jing Xue
1 sibling, 0 replies; 8+ messages in thread
From: Jing Xue @ 2008-12-03 14:24 UTC (permalink / raw)
To: Gary Yang; +Cc: git
(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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-p4 submit, Can't clobber writable file
2008-12-03 11:07 ` Arafangion
@ 2008-12-03 19:06 ` Gary Yang
0 siblings, 0 replies; 8+ messages in thread
From: Gary Yang @ 2008-12-03 19:06 UTC (permalink / raw)
To: Arafangion; +Cc: Jing Xue, git
Arafangion,
I got email from Jing and I solved the problem. The doc should clearly state that we need a separated P4 working dir in order to make git p4 submit work. Many thanks to Jing.
Gary
--- On Wed, 12/3/08, Arafangion <thestar@fussycoder.id.au> wrote:
> From: Arafangion <thestar@fussycoder.id.au>
> Subject: Re: git-p4 submit, Can't clobber writable file
> To: garyyang6@yahoo.com
> Cc: "Jing Xue" <jingxue@digizenstudio.com>, git@vger.kernel.org
> Date: Wednesday, December 3, 2008, 3:07 AM
> I would argue that's a bug with git-p4, however that is
> a warning given
> by perforce, thus, you should be able to work around it by
> changing the
> clientspec, change the clientspec so that it will clobber
> such files,
> you will need to refer to the perforce docs for info about
> that.
>
> On Tue, 2008-12-02 at 22:04 -0800, Gary Yang wrote:
> > 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. 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?
> >
> >
> > --- On Tue, 12/2/08, Jing Xue
> <jingxue@digizenstudio.com> wrote:
> >
> > > From: Jing Xue <jingxue@digizenstudio.com>
> > > Subject: Re: git-p4 submit, Can't clobber
> writable file
> > > To: "Gary Yang"
> <garyyang6@yahoo.com>
> > > Cc: git@vger.kernel.org
> > > Date: Tuesday, December 2, 2008, 7:07 PM
> > > On Tue, Dec 02, 2008 at 02:30:51PM -0800, Gary
> Yang wrote:
> > > >
> > > > I followed the instructions at
> > >
> http://modular.math.washington.edu/home/mhansen/git-1.5.5.1/contrib/fast-import/git-p4.txt
> > > >
> > > > But, I am not able to git-p4 submit. Any
> idea?
> > > >
> > > > git-p4 clone //build/scripts build_scripts
> > > > cd build_scripts
> > > > vi foo.h
> > > > git commit foo.h
> > > > git-p4 rebase
> > > > git-p4 submit
> > > >
> > > > from sets import Set;
> > > > Perforce checkout for depot path
> //build/scripts/
> > > located at /home/gyang/workspace/build_scripts/
> > > > Syncronizing p4 checkout...
> > > > //build/scripts/foo.h#1 - added as
> > > /home/gyang/workspace/build_scripts/foo.h
> > > > Can't clobber writable file
> > > /home/gyang/workspace/build_scripts/foo.h
> > > > //build/scripts/foo.c#1 - added as
> > > /home/gyang/workspace/build_scripts/foo.c
> > > > Can't clobber writable file
> > > /user/home/gyang/workspace/build_scripts/foo.c
> > > > ......
> > > > command failed: p4 sync ...
> > >
> > > 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.
> > >
> > > Cheers.
> > > --
> > > Jing Xue
> >
> >
> >
> > --
> > 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
>
> --
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-12-03 19:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).