public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* git mirror repacked, new branches
@ 2009-11-16  0:33 Bernie Innocenti
  2009-11-18 15:14 ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Bernie Innocenti @ 2009-11-16  0:33 UTC (permalink / raw)
  To: GCC Development

I repacked our (un)official git mirror (http://gcc.gnu.org/git) with 

 git repack -a -d -f --window=100 --depth=100 --window-memory=2g

The pack is now 600MB, which is a bit scary, but still manageable.
Mysteriously, cloning this repo yields a smaller pack of just 519MB,
which still contains all the branches. It was probably caused by entries
in the reflog, which I have now disabled.

As an additional bonus, I've added refs for all the current branches tom
make them visible in gitweb and easier to clone.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-16  0:33 git mirror repacked, new branches Bernie Innocenti
@ 2009-11-18 15:14 ` H.J. Lu
  2009-11-18 18:10   ` Bernie Innocenti
  0 siblings, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2009-11-18 15:14 UTC (permalink / raw)
  To: Bernie Innocenti; +Cc: GCC Development

On Sun, Nov 15, 2009 at 4:32 PM, Bernie Innocenti <bernie@codewiz.org> wrote:
> I repacked our (un)official git mirror (http://gcc.gnu.org/git) with
>
>  git repack -a -d -f --window=100 --depth=100 --window-memory=2g
>
> The pack is now 600MB, which is a bit scary, but still manageable.
> Mysteriously, cloning this repo yields a smaller pack of just 519MB,
> which still contains all the branches. It was probably caused by entries
> in the reflog, which I have now disabled.
>
> As an additional bonus, I've added refs for all the current branches tom
> make them visible in gitweb and easier to clone.
>

Most of vendor branches are wrong. For example, there are many branches
under branches/redhat. But I only see one redhat branch in git.

BTW, I can't pull new changes from the new master into my local git branches
which are based on the old master.


-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-18 15:14 ` H.J. Lu
@ 2009-11-18 18:10   ` Bernie Innocenti
  2009-11-18 18:39     ` H.J. Lu
  2009-11-19  5:12     ` Alexandre Oliva
  0 siblings, 2 replies; 9+ messages in thread
From: Bernie Innocenti @ 2009-11-18 18:10 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GCC Development

El Wed, 18-11-2009 a las 07:13 -0800, H.J. Lu escribió:
> On Sun, Nov 15, 2009 at 4:32 PM, Bernie Innocenti <bernie@codewiz.org> wrote:
> > I repacked our (un)official git mirror (http://gcc.gnu.org/git) with
> >
> >  git repack -a -d -f --window=100 --depth=100 --window-memory=2g
> >
> > The pack is now 600MB, which is a bit scary, but still manageable.
> > Mysteriously, cloning this repo yields a smaller pack of just 519MB,
> > which still contains all the branches. It was probably caused by entries
> > in the reflog, which I have now disabled.
> >
> > As an additional bonus, I've added refs for all the current branches tom
> > make them visible in gitweb and easier to clone.
> 
> Most of vendor branches are wrong. For example, there are many branches
> under branches/redhat. But I only see one redhat branch in git.

I guess git-svn does not cope automatically with nested subdirs in
banches/.

One could manually select them by passing multiple --branches options.
For our case, the man page shows how to map those branches to separate
namespaces:

  branches = stable/*:refs/remotes/svn/stable/*
  branches = debug/*:refs/remotes/svn/debug/*


Properly handling vendor branches would be a requisite step for a real
migration to git. For now, I'd rather be lazy and delay this work until
someone asks for it.


> BTW, I can't pull new changes from the new master into my local git branches
> which are based on the old master.

This is unexpected. Repacking doesn't change any SHA1, and I haven't
touched any of the existing branches. What error do you get from pull?

If you have access to the git tree on sourceware, would you mind
investigating this issue yourself since you can easily reproduce it?

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-18 18:10   ` Bernie Innocenti
@ 2009-11-18 18:39     ` H.J. Lu
  2009-11-18 20:03       ` Bernie Innocenti
  2009-11-19  5:12     ` Alexandre Oliva
  1 sibling, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2009-11-18 18:39 UTC (permalink / raw)
  To: Bernie Innocenti; +Cc: GCC Development

On Wed, Nov 18, 2009 at 10:09 AM, Bernie Innocenti <bernie@codewiz.org> wrote:
> El Wed, 18-11-2009 a las 07:13 -0800, H.J. Lu escribió:
>> On Sun, Nov 15, 2009 at 4:32 PM, Bernie Innocenti <bernie@codewiz.org> wrote:
>> > I repacked our (un)official git mirror (http://gcc.gnu.org/git) with
>> >
>> >  git repack -a -d -f --window=100 --depth=100 --window-memory=2g
>> >
>> > The pack is now 600MB, which is a bit scary, but still manageable.
>> > Mysteriously, cloning this repo yields a smaller pack of just 519MB,
>> > which still contains all the branches. It was probably caused by entries
>> > in the reflog, which I have now disabled.
>> >
>> > As an additional bonus, I've added refs for all the current branches tom
>> > make them visible in gitweb and easier to clone.
>>
>> Most of vendor branches are wrong. For example, there are many branches
>> under branches/redhat. But I only see one redhat branch in git.
>
> I guess git-svn does not cope automatically with nested subdirs in
> banches/.

If nested subdirs in banches/ aren't handled properly, shouldn't we avoid
putting them in git mirror?

> One could manually select them by passing multiple --branches options.
> For our case, the man page shows how to map those branches to separate
> namespaces:
>
>  branches = stable/*:refs/remotes/svn/stable/*
>  branches = debug/*:refs/remotes/svn/debug/*
>
>
> Properly handling vendor branches would be a requisite step for a real
> migration to git. For now, I'd rather be lazy and delay this work until
> someone asks for it.
>
>
>> BTW, I can't pull new changes from the new master into my local git branches
>> which are based on the old master.
>
> This is unexpected. Repacking doesn't change any SHA1, and I haven't
> touched any of the existing branches. What error do you get from pull?
>

Oops. Pilot error.


-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-18 18:39     ` H.J. Lu
@ 2009-11-18 20:03       ` Bernie Innocenti
  2009-11-19 22:46         ` Jason Merrill
  0 siblings, 1 reply; 9+ messages in thread
From: Bernie Innocenti @ 2009-11-18 20:03 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GCC Development

On Wed, 2009-11-18 at 10:38 -0800, H.J. Lu wrote:
> If nested subdirs in banches/ aren't handled properly, shouldn't we
> avoid putting them in git mirror?

You're right. I killed the bogus branches and asked the git folks for
advice.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-18 18:10   ` Bernie Innocenti
  2009-11-18 18:39     ` H.J. Lu
@ 2009-11-19  5:12     ` Alexandre Oliva
  2009-11-19  5:25       ` Bernie Innocenti
  1 sibling, 1 reply; 9+ messages in thread
From: Alexandre Oliva @ 2009-11-19  5:12 UTC (permalink / raw)
  To: Bernie Innocenti; +Cc: H.J. Lu, GCC Development

On Nov 18, 2009, Bernie Innocenti <bernie@codewiz.org> wrote:

> I guess git-svn does not cope automatically with nested subdirs in
> banches/.

That's correct.  (save for b*r*anches ;-)

> One could manually select them by passing multiple --branches options.

Yup.  Here's the configuration I'm using to build a git repo with all
branches, tags, and also retaining the ability to check out any
directory containing multiple tags, branches, and even the entire SVN
tree (look for dirs).

[svn-remote "svn"]
	rewriteRoot = svn+ssh://gcc.gnu.org/svn/gcc
	# url = svn+ssh://aoliva@gcc.gnu.org./svn/gcc
	url = file:///l/tmp/build/gcc/gccrepo
	fetch = trunk:refs/remotes/trunk
	branches = branches/ARM/*:refs/remotes/branches/ARM/*
	fetch = branches/ARM:refs/remotes/dirs/branches/ARM
	branches = branches/apple/*:refs/remotes/branches/apple/*
	fetch = branches/apple:refs/remotes/dirs/branches/apple
	branches = branches/csl/*:refs/remotes/branches/csl/*
	fetch = branches/csl:refs/remotes/dirs/branches/csl
	branches = branches/dead/*:refs/remotes/branches/dead/*
	fetch = branches/dead:refs/remotes/dirs/branches/dead
	branches = branches/gcj/*:refs/remotes/branches/gcj/*
	fetch = branches/gcj:refs/remotes/dirs/branches/gcj
	branches = branches/ibm/*:refs/remotes/branches/ibm/*
	fetch = branches/ibm:refs/remotes/dirs/branches/ibm
	branches = branches/ix86/*:refs/remotes/branches/ix86/*
	fetch = branches/ix86:refs/remotes/dirs/branches/ix86
	branches = branches/redhat/*:refs/remotes/branches/redhat/*
	fetch = branches/redhat:refs/remotes/dirs/branches/redhat
	branches = branches/st/*:refs/remotes/branches/st/*
	fetch = branches/st:refs/remotes/dirs/branches/st
	branches = branches/suse/*:refs/remotes/branches/suse/*
	fetch = branches/suse:refs/remotes/dirs/branches/suse
	branches = branches/ubuntu/*:refs/remotes/barnches/ubuntu/*
	fetch = branches/ubuntu:refs/remotes/dirs/branches/ubuntu
	branches = branches/*:refs/remotes/branches/*
	fetch = branches:refs/remotes/dirs/branches/root
	tags = tags/apple/*:refs/remotes/tags/apple/*
	fetch = tags/apple:refs/remotes/tags/dirs/apple
	tags = tags/csl/arm/*:refs/remotes/tags/csl/arm/*
	fetch = tags/csl/arm:refs/remotes/tags/dirs/csl/arm
	tags = tags/csl/coldfire/*:refs/remotes/tags/csl/coldfire/*
	fetch = tags/csl/coldfire:refs/remotes/tags/dirs/csl/coldfire
	tags = tags/csl/morpho/*:refs/remotes/tags/csl/morpho/*
	fetch = tags/csl/morpho:refs/remotes/tags/dirs/csl/morpho
	tags = tags/csl/renesas/*:refs/remotes/tags/csl/renesas/*
	fetch = tags/csl/renesas:refs/remotes/tags/dirs/csl/renesas
	tags = tags/csl/sourcerygxx/*:refs/remotes/tags/csl/sourcerygxx/*
	fetch = tags/csl/sourcerygxx:refs/remotes/tags/dirs/csl/sourcerygxx
	tags = tags/csl/wrs-linux/*:refs/remotes/tags/csl/wrs-linux/*
	fetch = tags/csl/wrs-linux:refs/remotes/tags/dirs/csl/wrs-linux
	tags = tags/csl/*:refs/remotes/tags/csl/others/*
	fetch = tags/csl:refs/remotes/tags/dirs/csl/root
	tags = tags/ix86/*:refs/remotes/tags/ix86/*
	fetch = tags/ix86:refs/remotes/tags/dirs/ix86
	tags = branches/st/tags/*:refs/remotes/tags/st/*
	fetch = branches/st/tags:refs/remotes/tags/dirs/st
	tags = tags/redhat/*:refs/remotes/tags/redhat/*
	fetch = tags/redhat:refs/remotes/tags/dirs/redhat
	tags = tags/ubuntu/*:refs/remotes/tags/ubuntu/*
	fetch = tags/ubuntu:refs/remotes/tags/dirs/ubuntu
	tags = tags/*:refs/remotes/tags/*
	fetch = tags:refs/remotes/tags/dirs/root
	fetch = :refs/remotes/dirs/root


-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-19  5:12     ` Alexandre Oliva
@ 2009-11-19  5:25       ` Bernie Innocenti
  0 siblings, 0 replies; 9+ messages in thread
From: Bernie Innocenti @ 2009-11-19  5:25 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: H.J. Lu, GCC Development

On Thu, 2009-11-19 at 03:11 -0200, Alexandre Oliva wrote:
> Yup.  Here's the configuration I'm using to build a git repo with all
> branches, tags, and also retaining the ability to check out any
> directory containing multiple tags, branches, and even the entire SVN
> tree (look for dirs).
> 
> [svn-remote "svn"]
> 	rewriteRoot = svn+ssh://gcc.gnu.org/svn/gcc
> 	# url = svn+ssh://aoliva@gcc.gnu.org./svn/gcc
> 	url = file:///l/tmp/build/gcc/gccrepo
> 	fetch = trunk:refs/remotes/trunk
> 	branches = branches/ARM/*:refs/remotes/branches/ARM/*
> 	fetch = branches/ARM:refs/remotes/dirs/branches/ARM
> 	branches = branches/apple/*:refs/remotes/branches/apple/*
> 	fetch = branches/apple:refs/remotes/dirs/branches/apple
> 	branches = branches/csl/*:refs/remotes/branches/csl/*
> 	fetch = branches/csl:refs/remotes/dirs/branches/csl
> 	branches = branches/dead/*:refs/remotes/branches/dead/*
> 	fetch = branches/dead:refs/remotes/dirs/branches/dead
> 	branches = branches/gcj/*:refs/remotes/branches/gcj/*
> 	fetch = branches/gcj:refs/remotes/dirs/branches/gcj
> 	branches = branches/ibm/*:refs/remotes/branches/ibm/*
> 	fetch = branches/ibm:refs/remotes/dirs/branches/ibm
> 	branches = branches/ix86/*:refs/remotes/branches/ix86/*
> 	fetch = branches/ix86:refs/remotes/dirs/branches/ix86
> 	branches = branches/redhat/*:refs/remotes/branches/redhat/*
> 	fetch = branches/redhat:refs/remotes/dirs/branches/redhat
> 	branches = branches/st/*:refs/remotes/branches/st/*
> 	fetch = branches/st:refs/remotes/dirs/branches/st
> 	branches = branches/suse/*:refs/remotes/branches/suse/*
> 	fetch = branches/suse:refs/remotes/dirs/branches/suse
> 	branches = branches/ubuntu/*:refs/remotes/barnches/ubuntu/*
> 	fetch = branches/ubuntu:refs/remotes/dirs/branches/ubuntu
> 	branches = branches/*:refs/remotes/branches/*
> 	fetch = branches:refs/remotes/dirs/branches/root
> 	tags = tags/apple/*:refs/remotes/tags/apple/*
> 	fetch = tags/apple:refs/remotes/tags/dirs/apple
> 	tags = tags/csl/arm/*:refs/remotes/tags/csl/arm/*
> 	fetch = tags/csl/arm:refs/remotes/tags/dirs/csl/arm
> 	tags = tags/csl/coldfire/*:refs/remotes/tags/csl/coldfire/*
> 	fetch = tags/csl/coldfire:refs/remotes/tags/dirs/csl/coldfire
> 	tags = tags/csl/morpho/*:refs/remotes/tags/csl/morpho/*
> 	fetch = tags/csl/morpho:refs/remotes/tags/dirs/csl/morpho
> 	tags = tags/csl/renesas/*:refs/remotes/tags/csl/renesas/*
> 	fetch = tags/csl/renesas:refs/remotes/tags/dirs/csl/renesas
> 	tags = tags/csl/sourcerygxx/*:refs/remotes/tags/csl/sourcerygxx/*
> 	fetch = tags/csl/sourcerygxx:refs/remotes/tags/dirs/csl/sourcerygxx
> 	tags = tags/csl/wrs-linux/*:refs/remotes/tags/csl/wrs-linux/*
> 	fetch = tags/csl/wrs-linux:refs/remotes/tags/dirs/csl/wrs-linux
> 	tags = tags/csl/*:refs/remotes/tags/csl/others/*
> 	fetch = tags/csl:refs/remotes/tags/dirs/csl/root
> 	tags = tags/ix86/*:refs/remotes/tags/ix86/*
> 	fetch = tags/ix86:refs/remotes/tags/dirs/ix86
> 	tags = branches/st/tags/*:refs/remotes/tags/st/*
> 	fetch = branches/st/tags:refs/remotes/tags/dirs/st
> 	tags = tags/redhat/*:refs/remotes/tags/redhat/*
> 	fetch = tags/redhat:refs/remotes/tags/dirs/redhat
> 	tags = tags/ubuntu/*:refs/remotes/tags/ubuntu/*
> 	fetch = tags/ubuntu:refs/remotes/tags/dirs/ubuntu
> 	tags = tags/*:refs/remotes/tags/*
> 	fetch = tags:refs/remotes/tags/dirs/root
> 	fetch = :refs/remotes/dirs/root

Amazing. And how well does this monster config work? Would you recommend
doing the same with our public git mirror?

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-18 20:03       ` Bernie Innocenti
@ 2009-11-19 22:46         ` Jason Merrill
  2009-11-20  2:51           ` Bernie Innocenti
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Merrill @ 2009-11-19 22:46 UTC (permalink / raw)
  To: Bernie Innocenti; +Cc: H.J. Lu, GCC Development

The git mirror seems to have stopped updating today.

Jason

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git mirror repacked, new branches
  2009-11-19 22:46         ` Jason Merrill
@ 2009-11-20  2:51           ` Bernie Innocenti
  0 siblings, 0 replies; 9+ messages in thread
From: Bernie Innocenti @ 2009-11-20  2:51 UTC (permalink / raw)
  To: Jason Merrill; +Cc: H.J. Lu, GCC Development

On Thu, 2009-11-19 at 17:45 -0500, Jason Merrill wrote:
> The git mirror seems to have stopped updating today.

Me bad. I had enabled the ibm and redhat branches in .git/config, and it
looked like it was working, but the second time "git svn fetch" ran it
choked because refs/remotes/ibm had been created as a file instead of a
directory:

 error: Unable to append to /home/bernie/gcc-testing.git/logs/refs/remotes/ibm/gcc-4_4-branch: Not a directory
 fatal: Cannot update the ref 'refs/remotes/ibm/gcc-4_4-branch'.
 update-ref -m r154300 refs/remotes/ibm/gcc-4_4-branch c0fab205b6b1e9bd16f72349cc26e4ebe0e10b09: command returned error: 128

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-20  2:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16  0:33 git mirror repacked, new branches Bernie Innocenti
2009-11-18 15:14 ` H.J. Lu
2009-11-18 18:10   ` Bernie Innocenti
2009-11-18 18:39     ` H.J. Lu
2009-11-18 20:03       ` Bernie Innocenti
2009-11-19 22:46         ` Jason Merrill
2009-11-20  2:51           ` Bernie Innocenti
2009-11-19  5:12     ` Alexandre Oliva
2009-11-19  5:25       ` Bernie Innocenti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).