git-p4

git-p4 migrate branches in different subdirectories

喜你入骨 提交于 2019-12-03 08:22:45
I want to migrate source code tree from perforce to git. The source code contains several dev branches scattered across perforce depot, not necessarily in the same directory. for example the structure is something like this - //depot/dev/project/master //depot/dev/project/branch1 //depot/dev/project/branch2 //depot/dev/sub-project/branch3 //depot/dev/sub-project/branch4 //depot/patch-project/branch5 //depot/patch-project/special/developern/branch6 I went though git-p4 documentation https://git-scm.com/docs/git-p4 BRANCH DETECTION section and also similar articles http://forums.perforce.com

Cloning a Partial Perforce Repo with git-p4

丶灬走出姿态 提交于 2019-12-01 07:31:54
What is the proper method to do a selective import of a large Perforce repo? The git-p4 docs mention that you can do a -//depot/main/ignore switch to filter directories. Would this be equivalent to running a git filter-branch to remove the same directories after a clone? Additionally, it appears Perforce provides another feature called a "client" view. I have not used Perforce before, so I am a little unfamiliar with the usage model. My current understanding is that one would use p4 somehow to setup a proper client view before running git p4 clone . Does anyone have the complete details?

Cloning a Partial Perforce Repo with git-p4

风格不统一 提交于 2019-12-01 04:49:04
问题 What is the proper method to do a selective import of a large Perforce repo? The git-p4 docs mention that you can do a -//depot/main/ignore switch to filter directories. Would this be equivalent to running a git filter-branch to remove the same directories after a clone? Additionally, it appears Perforce provides another feature called a "client" view. I have not used Perforce before, so I am a little unfamiliar with the usage model. My current understanding is that one would use p4 somehow

git p4 submit fails

夙愿已清 提交于 2019-11-30 20:28:12
I tried running git p4 submit on a repo that I've been running as an interim bridge between git and perforce. Multiple people are using the repo as a remote and its being periodically submitted back to perforce. It's been working mostly fine, except for some duplicated perforce commits whose bizarre behaviour I can't seem to reproduce. Then one day out of the blue I get this error. I can no longer push any git commits to perforce. user@hostname:~/Source/code$ git p4 submit -M --export-labels Perforce checkout for depot path //depot/perforce/workspace/ located at /home/user/Source/git-p4-area

git-p4 submit fails with patch does not apply

烈酒焚心 提交于 2019-11-30 20:05:22
When I do the following: $ git-p4 submit I wind up with the following error trace: error: patch failed: foo/bar/blah.h:1 error: foo/bar/blah.h: patch does not apply Unfortunately applying the change failed! What do you want to do? [s]kip this patch / [a]pply the patch forcibly and with .rej files / [w]rite the patch to a file (patch.txt) How can I recover from this situation and make a successful submission? FWIW, our P4 server is configured to use keyword expansion (filetype = text+k) and there is an expanded keyword at line 3 of the problem file. I made a change at line 1. I've tried

How to clone branch with git-p4?

与世无争的帅哥 提交于 2019-11-30 12:51:59
问题 I did: git p4 clone //depot/path/to/project/trunk/@all project to create the master branch of project . Now I want to clone //depot/path/to/project/release to the release branch of project . How is that done? UPDATE: Using --detect-branches doesn't work, either. It reports that it's updating two branches (when there are really three branches) but git branch reports only master exists. 回答1: Here are my setup notes from when I was using git-p4. It might be helpful: Download the p4 linux client.

p4merge error [GIT]

↘锁芯ラ 提交于 2019-11-30 06:24:55
问题 I am trying to use p4merge with git but I am getting: Error starting p4merge: "path/myFile" is (or points to) an invalid file (this lists the BASE, LOCAL, REMOTE, and standard version of the file). Git tells me about the conflict then it asks if I wanna start the mergetool configured (p4merge) and then I get the error above. Additional note: it happens with any file! Any clue about what this is and how to fix it? 回答1: This worked for me using msysGit on windows 7: git config --global merge

git-p4 submit fails with patch does not apply

梦想与她 提交于 2019-11-30 04:19:38
问题 When I do the following: $ git-p4 submit I wind up with the following error trace: error: patch failed: foo/bar/blah.h:1 error: foo/bar/blah.h: patch does not apply Unfortunately applying the change failed! What do you want to do? [s]kip this patch / [a]pply the patch forcibly and with .rej files / [w]rite the patch to a file (patch.txt) How can I recover from this situation and make a successful submission? FWIW, our P4 server is configured to use keyword expansion (filetype = text+k) and

p4merge error [GIT]

非 Y 不嫁゛ 提交于 2019-11-28 18:15:59
I am trying to use p4merge with git but I am getting: Error starting p4merge: "path/myFile" is (or points to) an invalid file (this lists the BASE, LOCAL, REMOTE, and standard version of the file). Git tells me about the conflict then it asks if I wanna start the mergetool configured (p4merge) and then I get the error above. Additional note: it happens with any file! Any clue about what this is and how to fix it? This worked for me using msysGit on windows 7: git config --global merge.tool p4merge git config --global mergetool.p4merge.cmd 'p4merge $BASE $LOCAL $REMOTE $MERGED' Not sure why but

Extending `git-p4` clientspec after initial clone

守給你的承諾、 提交于 2019-11-28 08:47:26
After doing a git-p4 clone --use-clientspec , I would like to add an extra entry to the clientspec, and import the current state of the added entry to my Git repository. After I extend the clientspec, a git-p4 rebase does nothing (probably because there was no new relevant changelist since the last committed change, all I did was update the clientspec) I tried doing a git-p4 sync --use-client-spec , but this complains that fast-import failed because the new tip does not contain my initial commit. Is there a way to extend the client spec, without having to git-p4 clone a new Git repository from