gitperforcegit-p4

git p4 clone says "No changes to import!" from virtual stream


I'm trying to use git-p4 for the first time ever, and I can't get it to clone my depot. Instead, I am seeing this:

enno@pop-os:~/work$ git p4 clone //Initech/tpsreports@all
Importing from //Initech/tpsreports@all into tpsreports
Reinitialized existing Git repository in /home/enno/work/tpsreports/.git/
No changes to import!
Not checking out any branch, use "git checkout -q -b master <branch>"

The resulting directory is empty except for the .git subdirectory.

What reason could there be for this command to not import anything from my depot?


Solution

  • git p4 clone requires a depot path (minus the trailing ... wildcard, confusingly), not a stream name.

    For most stream types, the stream name corresponds roughly to a depot path that is exactly the same as the stream name, but virtual streams are views of their parent stream, and actually refer to a subset of its depot path(s); the depot path corresponding to the virtual stream's name is usually going to be completely empty. (When you're using streams within Perforce, you usually don't have to be aware of this, because your client is associated with the stream you're working in, and the client is automatically generated to give you the correct view of the depot.)

    Do:

    p4 switch //Initech/tpsreports
    p4 where //...
    

    and you'll see which depot path //Initech/tpsreports corresponds to. (It's probably something like //Initech/main/tpsreports/....) That depot path is the path you'll want to provide as an argument to git p4 clone.