All of lore.kernel.org
 help / color / mirror / Atom feed
* [git-p4] Trouble importing all perforce branches into git repository
@ 2011-05-19 19:31 Grant Limberg
  2011-05-22 11:49 ` Pete Wyckoff
  0 siblings, 1 reply; 11+ messages in thread
From: Grant Limberg @ 2011-05-19 19:31 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 4052 bytes --]

I'm trying to import a project from my company's Perforce depot into a git repository. I've been successful getting a single branch into a single git repo, but what I'd like to do is to pull in the entire project plus all branches, but I can't get it working correctly.

I have my .p4settings file:

> P4PORT=perforce-server.local:1666
> P4USER=my.username
> P4CLIENT=my.clientspec.name

Clientspec is fairly simple:

> //project/... //my.clientspec.name/project/...
> -//project/External/... //my.clientspec.name/project/External/...

The second line is to exclude the external library binaries from the checkout.

I use the following command line to start git-p4 importing:

> git p4 clone --verbose --detect-branches --max-changes=100 //project/...@all
> 
This goes through and checks all the branch names, etc, and attempts to import starting at the first commit (in this case its changelists 771 for this project).

> Importing from //project/...@all into project
> Initialized empty Git repository in /Users/grant/Development/git_test/project/.git/
> Reading pipe: git config git-p4.useclientspec
> Reading pipe: git config git-p4.user
> Reading pipe: git config git-p4.password
> Reading pipe: git config git-p4.port
> Reading pipe: git config git-p4.host
> Reading pipe: git config git-p4.client
> p4 -G branches
> Opening pipe: p4 -G branches
> p4 -G branch -o branch-1
> Opening pipe: p4 -G branch -o branch-1
> Reading pipe: git config --bool core.ignorecase
> p4 -G branch -o branch-2
> ...
> Opening pipe: p4 -G branch -o branch-n
> p4-git branches: []
> initial parents: {}

I'm not sure if p4-git branches, and initial parents are supposed to be empty here, but they are.

Finally we get to the point where it's about to start importing changelists into git and the following happens:

> Getting p4 changes for //project/...
> p4 changes //project/...
> Reading pipe: p4 changes //project/...
> p4 -G describe 771
> Opening pipe: p4 -G describe 771
> Importing revision 771 (1%)branch is MAIN
> 
>     Importing new branch RCMerge/MAIN
> p4 changes //RCMerge/MAIN/...@1,770
> Reading pipe: p4 changes //RCMerge/MAIN/...@1,770
> 
>     Resuming with change 771
> parent determined through known branches: Branch-foo
> looking for initial parent for refs/remotes/p4/project/MAIN; current parent is refs/remotes/p4/project/Branch-foo
> commit into refs/remotes/p4/project/MAIN
> parent refs/remotes/p4/project/Branch-foo
> p4 -G -x - print
> Opening pipe: p4 -G -x - print
> Glue/source/.empty
> fatal: Invalid ref name or SHA1 expression: refs/remotes/p4/project/Branch-foo
> fast-import: dumping crash report to .git/fast_import_crash_26002

Here's the file referenced above:

> fast-import crash report:
>     fast-import process: 26002
>     parent process     : 26000
>     at Thu May 19 11:51:54 2011
> 
> fatal: Invalid ref name or SHA1 expression: refs/remotes/p4/project/Branch-foo
> 
> Most Recent Commands Before Crash
> ---------------------------------
>   checkpoint
>   commit refs/remotes/p4/project/MAIN
>   committer Some User <some.user@domain.com> 1253574589 -0800
>   data <<EOT
> * from refs/remotes/p4/project/Branch-foo
> 
> Active Branch LRU
> -----------------
>     active_branches = 0 cur, 5 max
> 
>   pos  clock name
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Inactive Branches
> -----------------
> refs/remotes/p4/project/MAIN:
>   status      : dirty
>   tip commit  : 0000000000000000000000000000000000000000
>   old tree    : 0000000000000000000000000000000000000000
>   cur tree    : 0000000000000000000000000000000000000000
>   commit clock: 0
>   last pack   : 
> 
> 
> Marks
> -----
> 
> -------------------
> END OF CRASH REPORT

Now, being a perforce novice, I have no idea what this means and have no idea how to resolve this issue, or if its even possible. Has anyone run into a similar issue before? If so, how did you resolve it?


Grant Limberg
glimberg@gmail.com




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-06-16 10:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 19:31 [git-p4] Trouble importing all perforce branches into git repository Grant Limberg
2011-05-22 11:49 ` Pete Wyckoff
2011-05-23  3:27   ` Grant Limberg
2011-05-23 10:54     ` Vitor Antunes
2011-05-23 16:18       ` Grant Limberg
2011-05-23 17:38         ` Vitor Antunes
2011-05-23 20:06           ` Grant Limberg
2011-06-16  8:28             ` tumik
2011-06-16  8:51               ` Thomas Berg
2011-06-16  9:35                 ` tumik
2011-06-16 10:05                   ` Thomas Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.