Search code examples
gitperforcegit-p4

git-p4: Can't Map File error


I am using this version of gitp4.py and I have the following error while trying to clone a repo.

  git p4 clone //xxx/xxx@all xxx
    Importing from //xxx/xxx@all into xxx
    Initialized empty Git repository in /cygdrive/d/xxx/.git/
    Import destination: refs/remotes/p4/master
    Importing revision 00000(0%)
    Importing revision 00001(2%) Error from p4 print for //xxx/xxx/xxx/SomeFile.cs: Can't map //yyy/yyy/yyy/SomeFile.cs

Note that the root paths are different. It seems that my repo (xxx) contains a file that refers to another repo (yyy). I don't have access to the yyy repo. Is there a way to prevent this error by skipping this revision entirely or deleting this file from the history ?

Thanks, M.


Solution

  • If you don't need the entire history, you can replace @all with a range of revisions.

    Otherwise:

    1. Ask your p4 admin to give you access to the file.
    2. Ask your p4 admin to use p4 obliterate to remove the file.