I had interest in being able to see plan 9 source at bitbucket.org.
Part of the driver was my continuing inability to get replica to work
well at home, and part just a need to tinker :-)

So, I created an empty repo at bitbucket.org,
http://bitbucket.org/rminnich/sysfromiso/overview

and then did the usual
hg clone -e '/bin/openssh/ssh -2' ssh://h...@bitbucket.org/rminnich/sysfromiso

At this point on Plan 9 I have a directory, sysfromiso, that is empty
save for a .hg

Now on linux or other systems, you copy a bunch of directories in
there, hg add them, and away you go.

Plan 9 is more interesting:

hget http://plan9.bell-labs.com/plan9/download/plan9.iso.bz2>/tmp/iso.bz2
 rc -c 'cd /tmp; bunzip2 iso.bz2'
 9660srv -f /tmp/iso iso
mount /srv/iso /n/iso

now I've got the sources over there in /n/iso. What's next?

Simple:

cd sysfromiso
bind -a /n/iso .

And then add some trees:
hg add sys/src

then
hg commit
hg push -e '/bin/openssh/ssh -2'

And I've got a starting point. What's interesting is that the
directory always looks empty until I do the bind:
term% ls sysfromiso
sysfromiso/.hg
term%

So the script to continue updating the repo is pretty simple:
 #!/bin/rc
hget http://plan9.bell-labs.com/plan9/download/plan9.iso.bz2>/tmp/iso.bz2
 rc -c 'cd /tmp; bunzip2 iso.bz2'
 9660srv -f /tmp/iso iso
mount /srv/iso /n/iso
ape/psh
cd sysfromiso
bind -b /n/iso .
x=`date`
hg commit -m "$x"
hg push -e  '/bin/openssh/ssh -2'

(note I need ape/psh when I use ssh for pushes -- quoting rules issue)

This can be run from cron -- once you get through the ssh issues I
mentioned in the earlier note.

Result is an hg repo on bitbucket.org that I can get to from anywhere,
and I can watch as Geoff continues to beat on the kw port :-)

More importantly, it's going to be easier for me to bisect and find
problems when I build from kernel source, which is very handy in my
case. The web interface of bitbucket gives me a pretty reasonable way
to compare different revs. I'm offering this note in the event others
want to use this interface and repo.

ron

Reply via email to