`git -p4 clone` fails" new review ... does not contain ... "

I start on Windows, with the windows p4 client and git installed through Cygwin. The p4 client advertises how its syntax is regular across platforms, and all that is why it should be hunky-dory.

So, when I go to git-p4 clone --verbose //depot/path/to/source , it lists all the files in the repository as if they were extracted and then dies, saying

Exception: quick import failed: warning: do not update refs / remotes / p4 / master (new tip cd601b92da8625c90af05685e450e55b6d19c9e9 does not contain 3a512c9408e3cbeef 94c78dfd7115f81e4a6fd0d)

and ends with a large git -fast-import statistics block. Looking for a mistake: new review? BUT? What needs to be held back?

What I have left is a .git relay, in which there are several megabytes (much less than the full source tree). Any ideas?

+6
git perforce git-p4
source share
5 answers

I had a similar problem and can usually be traced back to the shell in paths, branch names, etc. Not sure about P4, but make sure you donโ€™t have a master branch - this should be a master. Follow the same shelf all over the board. Also, avoid directory names and file names with spaces in them. Many git-centric tools don't like this. Gitolit is one example. This will not allow the repository in which there is a space.

+3
source share

Similar to the accepted answer, I had the same problem when trying to synchronize with the git branch in the form:

 git p4 sync --branch=feature/f1 //depot/path/to/code 

The same critical message with quick import was called in the header / in the branch name. Unfortunately, git-p4 does not seem to support the standard git -flow branch names.

Changed to a branch like this:

 git p4 sync --branch=f1 //depot/path/to/code 
+2
source share

I also ran into the error "new recall x does not contain y" with quick import.

In my case, this was caused by an unrelated prior commit in the main repo branch to which I was trying to import. I initialized the repo with the GitHub client, which added the initial commit (to add the .gitignore file). The fast import tool did not seem to be able to match the imported commits with the current state of the branch, as the GitHub command was not related to the imported commits.

The solution for me was to instead initialize an empty repo using "git init" and then start a quick import.

+1
source share

Do you get the โ€œIgnore XYZ revision because it would create an empty commitโ€ for the first CL to be imported?

If so, you get an error in git -p4.py where it clears the "initialParent" parameter (it is necessary that git fast-import can join new commits before the previous import) before it actually does something. Therefore, the new stream of imported files remains unconnected with the old.

I am currently working on this using -changesfile and explicitly determining which CL to import.

+1
source share

I had similar problems. What worked for me was updating the git -p4 python code. You can take a look at the commit here , but hopefully it will be closed soon.

0
source share

All Articles