How to migrate repositories from Perforce to GitHub using git p4 when the source repository path contains spaces

218 Views Asked by At

We are moving from Perfoce to GitHub and we are using git-p4 to migrate our solutions with full history. Some of the solutions however, have spaces in their source paths.

e.g. //Development/Custom/Projects/API1/JOE SOAP/Proposal12345

Note the space between JOE and SOAP.

No matter what we've tried, we can't get the migration to succeed.

Here are the combinations we've tried with the related output

git p4 clone //Development/Custom/Projects/API1/JOE SOAP/Proposal12345@all
Importing from //Development/Custom/Projects/API1/JOE into SOAP/CR-13016@all
Reinitialized existing Git repository in C:/CommandLineTools/temp/SOAP/CR-13016@all/.git/
Doing initial import of //Development/Custom/Projects/API1/JOE/ from revision #head into refs/remotes/p4/master
p4 returned an error: //Development/Custom/Projects/API1/JOE/...#head - no such file(s).

fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:       5000
Total objects:            0 (         0 duplicates                  )
      blobs  :            0 (         0 duplicates          0 deltas of          0 attempts)
      trees  :            0 (         0 duplicates          0 deltas of          0 attempts)
      commits:            0 (         0 duplicates          0 deltas of          0 attempts)
      tags   :            0 (         0 duplicates          0 deltas of          0 attempts)
Total branches:           0 (         0 loads     )
      marks:           1024 (         0 unique    )
      atoms:              0
Memory total:          2399 KiB
       pools:          2048 KiB
     objects:           351 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =      65536
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 35184372088832
pack_report: pack_used_ctr            =          0
pack_report: pack_mmap_calls          =          0
pack_report: pack_open_windows        =          0 /          0
pack_report: pack_mapped              =          0 /          0
---------------------------------------------------------------------
git p4 clone //Development/Custom/Projects/API1/JOE\ SOAP/Proposal12345@all
Importing from //Development/Custom/Projects/API1/JOE/ into SOAP/CR-13016@all
Reinitialized existing Git repository in C:/CommandLineTools/temp/SOAP/CR-13016@all/.git/
Doing initial import of //Development/Custom/Projects/API1/JOE/ from revision #head into refs/remotes/p4/master
p4 returned an error: //Development/Custom/Projects/API1/JOE/...#head - no such file(s).

fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:       5000
Total objects:            0 (         0 duplicates                  )
      blobs  :            0 (         0 duplicates          0 deltas of          0 attempts)
      trees  :            0 (         0 duplicates          0 deltas of          0 attempts)
      commits:            0 (         0 duplicates          0 deltas of          0 attempts)
      tags   :            0 (         0 duplicates          0 deltas of          0 attempts)
Total branches:           0 (         0 loads     )
      marks:           1024 (         0 unique    )
      atoms:              0
Memory total:          2399 KiB
       pools:          2048 KiB
     objects:           351 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =      65536
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 35184372088832
pack_report: pack_used_ctr            =          0
pack_report: pack_mmap_calls          =          0
pack_report: pack_open_windows        =          0 /          0
pack_report: pack_mapped              =          0 /          0
---------------------------------------------------------------------
git p4 clone "//Development/Custom/Projects/API1/JOE SOAP/Proposal12345@all"
Importing from //Development/Custom/Projects/API1/JOE SOAP/CR-13016@all into CR-13016
Reinitialized existing Git repository in C:/CommandLineTools/temp/CR-13016/.git/
Command failed: p4 -d "C:\CommandLineTools\temp\CR-13016" changes //Development/Custom/Projects/API1/JOE SOAP/CR-13016/...
fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:       5000
Total objects:            0 (         0 duplicates                  )
      blobs  :            0 (         0 duplicates          0 deltas of          0 attempts)
      trees  :            0 (         0 duplicates          0 deltas of          0 attempts)
      commits:            0 (         0 duplicates          0 deltas of          0 attempts)
      tags   :            0 (         0 duplicates          0 deltas of          0 attempts)
Total branches:           0 (         0 loads     )
      marks:           1024 (         0 unique    )
      atoms:              0
Memory total:          2399 KiB
       pools:          2048 KiB
     objects:           351 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =      65536
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 35184372088832
pack_report: pack_used_ctr            =          0
pack_report: pack_mmap_calls          =          0
pack_report: pack_open_windows        =          0 /          0
pack_report: pack_mapped              =          0 /          0
---------------------------------------------------------------------
git p4 clone "//Development/Custom/Projects/API1/JOE\ SOAP/Proposal12345@all"
Importing from //Development/Custom/Projects/API1/JOE/ SOAP/CR-13016@all into CR-13016
Reinitialized existing Git repository in C:/CommandLineTools/temp/CR-13016/.git/
Command failed: p4 -d "C:\CommandLineTools\temp\CR-13016" changes //Development/Custom/Projects/API1/JOE/ SOAP/CR-13016/...
fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:       5000
Total objects:            0 (         0 duplicates                  )
      blobs  :            0 (         0 duplicates          0 deltas of          0 attempts)
      trees  :            0 (         0 duplicates          0 deltas of          0 attempts)
      commits:            0 (         0 duplicates          0 deltas of          0 attempts)
      tags   :            0 (         0 duplicates          0 deltas of          0 attempts)
Total branches:           0 (         0 loads     )
      marks:           1024 (         0 unique    )
      atoms:              0
Memory total:          2399 KiB
       pools:          2048 KiB
     objects:           351 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =      65536
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 35184372088832
pack_report: pack_used_ctr            =          0
pack_report: pack_mmap_calls          =          0
pack_report: pack_open_windows        =          0 /          0
pack_report: pack_mapped              =          0 /          0
---------------------------------------------------------------------

Has anyone found a way around this?

1

There are 1 best solutions below

2
On

I don't know precisely what the problem is, I'd expect the 3rd alternative to work.

Maybe try doing it on Linux?

Also maybe try running p4 -d "C:\CommandLineTools\temp\CR-13016" changes //Development/Custom/Projects/API1/JOE SOAP/CR-13016/... directly and see what fails?