Search code examples
git-p4

Can `git-p4 sync` grab files only up to the timestamp specified like `p4 sync` does?


I need to import 500+ projects from Perforce to Git, and all are related to each other. For that I need to "freeze" the world and import all the projects from the same time. The script I wrote runs for about 2 days, which means that developers, over those 2 days, could submit changes, which will break the already-imported projects.

I know that p4 sync //depot/path/to/project/...@$timestamp imports projects with commits/submissions up to the $timestamp. does git p4 sync //path/to/projects have that option? Documentation does not mention import at timestamp at all.


Solution

  • http://git-scm.com/docs/git-p4 suggests that you can do:

    "//depot/my/project@1,6"
    

    This requires calculation of the correct commits, but p4 should be able to give you that.