Am Donnerstag, 13. August 2015, 13:14:34 schrieb Bram Moolenaar:
> 
> Markus Heidelberg wrote:
> 
> [...]
> 
> > > > 2. Conversion from HG to Git
> > > > ****************************
> > > > 
> > > 
> > > So, what we would need to do is use the export to github for whatever
> > > functionality it provides, but then wipe the git repository, do the
> > > conversion from Mercurial to git locally, and then upload the result to
> > > github.  Since this is going to be the new root for what everybody uses,
> > > we better make sure this is a clean repository.
> > 
> > Exactly!
> 
> OK. So that are the best commands to do this conversion?

Instead of "wipe the git repository" say "remove and create an empty git
repository" to be sure no stale stuff is left. But I guess you already
did this for your 2nd test repo.

Also the Git cleanup has to be added as last step.

> I suppose I
> can try this out now, since the github repository is for testing only.
> 
> You mentioned the size of the repository after "export to github" was
> much larger than the one resulting from the local conversion.  How do
> you see that?

Try this (using your 2nd test repo):

$ git clone https://github.com/vim/vim.git
[..]
Receiving objects:  42% (22538/53119), 206.21 MiB | 622.00 KiB/s

-> 200 MB already transferred and still 58% to do. I aborted then.

It seems like GitHub optimizes the repository some day later or
regularly because your first test repo (now at
https://github.com/vim/vim-old-tryout) has a reasonable compact size:
Receiving objects: 100% (52960/52960), 33.29 MiB | 657.00 KiB/s, done.

$ du -sh vim-old-tryout/.git
36M     .git

But I remember my initial clone a few months ago was really big.

Compare the size of .git/ with your locally converted Git repo, this
must be huge (743 MB for me).

And if you clone this big repository and do not repack yourself, you
have a great loss of performance, try e.g. "git log --graph".

The difference does not come from the conversion script done locally,
but from the missing packfile optimization, see that section in
git-fast-import(1), which recommends this:

$ git repack -a -d -f

And then for your local clone (this will not have a positive effect for
the published repo):

$ git gc

> > > > 3. Cleanup in the Git repository
> > > > ********************************
> > > > 
> > > > There were suggestions to use the Git mirror from vim-jp as base for the
> > > > official repository, don't know if this is still an option.
> > > 
> > > Only if there are real advantages.  I tend to think not.
> > 
> > OK, then I would document a procedure for local HG to Git conversion and
> > create a script for Git repository cleanup.
> 
> Can you give me that script?  I could give it a try.

I hope to get the cleanup script done during this weekend.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui