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

Re: git-p4 submit, Can't clobber writable file

From
RDReece Dunn <msclrhd@googlemail.com>
Date
Dec 2, 2008, 23:51 UTC
Message-ID
<3f4fd2640812021551t5451e6e3i91e6d2694c89e085@mail.gmail.com>
In-Reply-To
<40586.80065.qm@web37902.mail.mud.yahoo.com>
2008/12/2 Gary Yang <garyyang6@yahoo.com>:
Show 15 quoted lines
>
> 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.

Show 6 quoted lines
> //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
Previous: Gary YangNext: Gary Yang
Message 2 of 8 in “git-p4 submit, Can't clobber writable file”
  1. Gary YangDec 2, 2008
  2. Reece DunnDec 2, 2008
  3. Gary YangDec 3, 2008
  4. Jing XueDec 3, 2008
  5. Gary YangDec 3, 2008
  6. ArafangionDec 3, 2008
  7. Gary YangDec 3, 2008
  8. Jing XueDec 3, 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.