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, 13:50 UTC
Message-ID
<81b0412b0908030650oc39f4a3s7c059e300b65addb@mail.gmail.com>
In-Reply-To
<1249299010.7164.8.camel@maia.lan>
On Mon, Aug 3, 2009 at 13:30, Sam Vilain<sam@vilain.net> wrote:
Show 7 quoted lines
> On Mon, 2009-08-03 at 10:47 +0200, Alex Riesen wrote:
>> Is it an import-once tool, or can the process be restarted? (because it looks
>> like the script needs a complicated setup).
>
> It's fully restartable.  Not only that but it uses transaction
> protection to make sure that its internal state doesn't get corrupted
> when performing the various options.

"varios options"? Operations? As when working on a live server? Aren't P4 changelist numbers always increasing? Or you mean the protection against multiple running instances of p4raw, so it is also parallelizable?

Show 7 quoted lines
>> 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).
>
> No, it's server only. ...
Darn. I hoped it wasn't. Can't play with it, then.
> ... I think I did get around to implementing not having
> to go through all the stages for branches you didn't care to import.  It's
> difficult though, the stage which correlates those thousands of 'integrate'
> records is never going to be fast.

Maybe if it is done locally, it can be improved? You seem to use the Postgre for lookups, right?

> Be prepared to tune your postgres - add lots of shared_buffers and
> sort memory if your project is as large as Perl.

Mine isn't, but it is thrown on a server with a lot of others. Some branched off mine, some integrate it, some just copied and re-introduced into repository (these will probably worked with manually forever). There is also a small problem of different P4 servers, hosting code from the same project (they pull different repos together on client, imagine that!)

And all of them go back for 5-6 years, so it is kind of largish (not to mention a mess of binaries).

Some branches I hope to merge back. I do that already, but it is a lot of manual work (I use that git-p4-import.bat I posted early, which only can import a sequence of changelists with files they touch).

That's were I hoped your project could help. I thought, if I pull in all the needed changelists (selected by path/CL), there may be a way to recreate a mergeable history out of this dump. At least, one involving less labor then I have to do now.

Previous: Sam VilainNext: Sam Vilain
Message 10 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.