git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [git-p4] Trouble importing all perforce branches into git repository

From
Grant Limberg <glimberg@gmail.com>
Date
May 23, 2011, 20:06 UTC
Message-ID
<0AC6DD14-3042-4A18-91AC-1CE77D8B4CD2@gmail.com>
In-Reply-To
<BANLkTik+Zp1Fvi_zABCtAZH0RKA68n5Svw@mail.gmail.com>
On May 23, 2011, at 10:38 AM, Vitor Antunes wrote:
Show 25 quoted lines
> Hi Grant,
> 
>> The "Branch-foo" that git-p4 is crashing on does have a branchspec in
>> Perforce.  I cannot, however guarantee that branchspecs were
>> correctly created and used for all integrates in the repository.  It
>> was created long before I started working here.
> 
> You can create the branch specs now. There is no requirement for them to
> have been created at the time of the integration.
> 
> I've sent a patch to this mailing list [1] that adds the possibility of
> creating these branches in a gitconfig file. If you feel brave enough,
> please give it a try. The patch is missing a test case, which I still
> did not have time to review and send
> 
>> Is there a way to limit --detect-branches to only certain branches
>> that I can ensure do have branchspecs?
> 
> If you have an incremental structure you could limit the cloning to a
> subset of the directories. I am not aware of any other way. Maybe
> someone else in the mailing list can shed some light...? :)
> 
> Vitor
> 
> [1] http://thread.gmane.org/gmane.comp.version-control.git/167998/focus=168000
I think I just figured out the problem.  The branch mapping between //project/MAIN/... and //project/Branch-foo/... was done backwards, thus git-p4 was expecting Branch-foo to be a parent of MAIN when the inverse was actually true.  MAIN's first changelist number was 771.  Branch-foo's first changelist number was 7652.  That's why git-p4 was getting confused.  I fixed the branch mapping in Perforce and the clone with --detect-branches seems to be working fine now. 

Grant Limberg glimberg@gmail.com

Previous: Vitor AntunesNext: tumik
Message 7 of 11 in “[git-p4] Trouble importing all perforce branches into git repository”
  1. Grant LimbergMay 19, 2011
  2. Pete WyckoffMay 22, 2011
  3. Grant LimbergMay 23, 2011
  4. Vitor AntunesMay 23, 2011
  5. Grant LimbergMay 23, 2011
  6. Vitor AntunesMay 23, 2011
  7. Grant LimbergMay 23, 2011
  8. tumikJun 16, 2011
  9. Thomas BergJun 16, 2011
  10. tumikJun 16, 2011
  11. Thomas BergJun 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.