Re: git-p4: Clone p4 path with bidirectional integrations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luke,

> It's possible that running with "-v" might give a bit more information.

Here's the output from that. I've set git-p4.branchUser in this test
to avoid needlessly cluttering the output since I have a huge amount
of branches in my Perforce repo, but otherwise I used the exact script
which I've included later in this email:

Importing from //depot/testing/...@all into .
Reinitialized existing Git repository in
/home/amiller/Code/git-migration/repos/testing/.git/
Reading pipe: ['git', 'config', '--bool', 'git-p4.useclientspec']
Reading pipe: ['git', 'config', 'git-p4.branchUser']
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']
Reading pipe: ['git', 'config', '--int', 'git-p4.retries']
Reading pipe: ['git', 'config', '--int', 'git-p4.retries']
Opening pipe: ['p4', '-r', '3', '-G', 'login', '-s']
Opening pipe: p4 -r 3 -G branches -u amiller
Reading pipe: ['git', 'config', '--get-all', 'git-p4.branchList']
p4-git branches: []
initial parents: {}
Getting p4 changes for //depot/testing/...
Opening pipe: ['p4', '-r', '3', '-G', 'changes', '-m', '1']
Opening pipe: ['p4', '-r', '3', '-G', 'changes',
'//depot/testing/...@1,1048577']
Opening pipe: ['p4', '-r', '3', '-G', 'changes',
'//depot/testing/...@1048578,1206544']
Opening pipe: ['p4', '-r', '3', '-G', 'describe', '-s', '1206099']
Importing revision 1206099 (25%)Reading pipe: ['git', 'config',
'--bool', 'core.ignorecase']
branch is master

    Importing new branch testing/master
Opening pipe: ['p4', '-r', '3', '-G', 'changes',
'//depot/testing/master/...@1,1048577']
Opening pipe: ['p4', '-r', '3', '-G', 'changes',
'//depot/testing/master/...@1048578,1206098']

    Resuming with change 1206099
parent determined through known branches: staging
looking for initial parent for refs/remotes/p4/testing/master; current
parent is refs/remotes/p4/testing/staging
Creating temporary branch: refs/git-p4-tmp/1206099
commit into refs/git-p4-tmp/1206099
Reading pipe: ['git', 'config', '--bool', 'git-p4.keepEmptyCommits']
Opening pipe: ['p4', '-r', '3', '-G', '-x', '-', 'print']
//depot/testing/master/test1 --> test1 (0 MB)
checkpoint finished: progress checkpoint

Reading pipe: ['git', 'rev-list', '--reverse', '--no-merges',
'refs/remotes/p4/testing/staging']
fatal: ambiguous argument 'refs/remotes/p4/testing/staging': unknown
revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Traceback (most recent call last):
  File "/home/amiller/.bin/git-p4.py", line 4173, in <module>
    main()
  File "/home/amiller/.bin/git-p4.py", line 4167, in main
    if not cmd.run(args):
  File "/home/amiller/.bin/git-p4.py", line 3923, in run
    if not P4Sync.run(self, depotPaths):
  File "/home/amiller/.bin/git-p4.py", line 3790, in run
    self.importChanges(changes)
  File "/home/amiller/.bin/git-p4.py", line 3451, in importChanges
    blob = self.searchParent(parent, branch, tempBranch)
  File "/home/amiller/.bin/git-p4.py", line 3374, in searchParent
    "--no-merges", parent]):
  File "/home/amiller/.bin/git-p4.py", line 237, in read_pipe_lines
    die('Command failed: %s' % str(c))
  File "/home/amiller/.bin/git-p4.py", line 165, in die
    raise Exception(msg)
Exception: Command failed: ['git', 'rev-list', '--reverse',
'--no-merges', 'refs/remotes/p4/testing/staging']


> Can you write a test case, or even just a shell script, that might
> help figure out what's going on.

No problem:

#!/bin/bash

# perforce setup - assumes PWD is mapped to //depot/...
mkdir -p testing/master
touch testing/master/test1
p4 add testing/master/test1
p4 submit -d 'test changelist 1'

p4 integrate //depot/testing/master/... //depot/testing/staging/...
p4 submit -d 'test changelist 2'

touch testing/staging/test2
p4 add testing/staging/test2
p4 submit -d 'test changelist 3'

p4 integrate //depot/testing/staging/... //depot/testing/master/...
p4 submit -d 'test changelist 4'

# clone with git-p4:
git init p4_git_test
cd p4_git_test
git config git-p4.branchList master:staging
git config --add git-p4.branchList staging:master
git p4 clone //depot/testing/...@all --detect-branches --verbose .


Thanks,
Aaron



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux