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

Re: From P4 to Git

From
Alex Riesen <raa.lkml@gmail.com>
Date
Aug 3, 2009, 08:47 UTC
Message-ID
<81b0412b0908030147i34a7440dg982c7a6e7dc51bca@mail.gmail.com>
In-Reply-To
<4A76967B.7080502@vilain.net>
On Mon, Aug 3, 2009 at 09:49, Sam Vilain<sam@vilain.net> wrote:
Show 27 quoted lines
> Alex Riesen wrote:
>>> So it looks like you wouldn't _need_ to split source tree into separate
>>> smaller repositories for performance reasons.  Still it might be good
>>> idea to put separate (sub)projects into separate repositories.  But
>>> I guess you can do that even at later time (although it would be best
>>> to do this upfront).
>>>
>>
>> It looks like they use P4 branches. Which are NOT branches as Git
>> understands it (a line of history). The P4 "branches" are just directories
>> with some metadata regarding recording where the data in the directory
>> were before an act of "branching" (just a server-side recursive copy).
>>
>> In this case (and this must be, as there are no other branches in P4),
>> they'll have to split their repository.
>
> p4's branches are 'close enough'.  My tool travels through the history
> of the repository forwards, detects paths where new content was placed
> and calls those roots.  When branching is detected (recorded
> file-by-file in perforce), it puts the branch source as a new parent.
> When branches are 'integrated', it makes a fuzzy decision based on the
> number of outstanding merges it thinks are due, also based on a merge
> base calculation on the current view of the derived history.  It allows
> manual correction of this fuzzy information, and arbitrary grafting
> along the way.  Discrepancies between the fuzzy decision and the actual
> integration records are recorded in the commit log along with other
> metadata including the commit ID.
Sounds dangerous. And interesting...

Is it an import-once tool, or can the process be restarted? (because it looks like the script needs a complicated setup). Can it be used from a client machine? And more importantly: can the branches be found from incomplete history, restricted by path and changelist range? (because, in a corporate setup, clients seldom have full access to all data).

Previous: Sam VilainNext: Sam Vilain
Message 8 of 16 in “From P4 to Git”
  1. Arnaud BaillyJul 28, 2009
  2. david@lang.hmJul 28, 2009
  3. Jakub NarebskiJul 28, 2009
  4. John TapsellAug 3, 2009
  5. Jakub NarebskiJul 31, 2009
  6. Alex RiesenJul 31, 2009
  7. Sam VilainAug 3, 2009
  8. Alex RiesenAug 3, 2009
  9. Sam VilainAug 3, 2009
  10. Alex RiesenAug 3, 2009
  11. Sam VilainAug 3, 2009
  12. Alex RiesenAug 3, 2009
  13. Sam VilainAug 4, 2009
  14. Sam VilainAug 2, 2009
  15. Arnaud BaillyAug 4, 2009
  16. Peter BaumannAug 4, 2009

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.