Git -p4 submit fails with error "Path is not in client root"

I configured a git repository mirror for the perforce repository via git -p4 as described at http://answers.perforce.com/articles/KB_Article/Git-P4 and worked great for some time: I managed to push my changes to git and submit git changes in perforce. Then the command git p4 submit

stopped working. When I run it, I get an error:

You have files opened with perforce! Close them before starting the sync.

      

When I run it in verbose mode, it shows that the command p4 -c <client name> -G opened ...

fails with the following output:

{scodeserrorsdatasrPath '/path/to/git/clone/...' is not under client root '/path/to/git-p4-area'.
severityisgenerici0%

      

Well, it really isn't underneath /path/to/git-p4-area

, but it wasn't a problem before. Also I can still run git p4 rebase

without issue. How to fix the error Path is not under client root

?

Update

I was able to work it out by replying to Brian. Turns out the error I received was correct, I actually had files open in perforce. I got them back with a command p4 revert ...

inside /path/to/git-p4-area

and it git p4 submit

works fine now .

The error was confusing me because when you use git -p4 you are not changing files in the perforce workspace, instead you are working with a git repository and git -p4 translates git commits to perforce the changes and vice versa. It turns out that my permanent ticket expired in the middle of the last send operation (ticket expires every 12 hours). Therefore, some files were left open in the perforce workspace. The best solution would be to work less than 12 hours ...

+3


source to share


2 answers


This is the solution for me:

$ p4 opened -s | awk '{print $1}' | xargs p4 revert

      



... because the output p4 opened

was (unexpectedly) not empty.

After that, the usual git p4 submit

succeeded.

+3


source


The client root tells the Perforce server where your copy of the files is stored on your workstation or laptop. Perhaps you have copied or renamed or transferred this folder to your workstation?

If you have inadvertently moved or renamed a folder, you can move it back to where the server is expecting it.



Or you could use the "p4 client" command to update your client root so that the Perforce server knows where the files are stored on your workstation.

+2


source







All Articles