git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Casey Dahlin <cdahlin@redhat.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Luke Kenneth Casson Leighton <luke.leighton@gmail.com>,
	git <git@vger.kernel.org>
Subject: Re: [RFC PATCH] Introduce git-hive
Date: Tue, 31 Aug 2010 10:38:39 -0400	[thread overview]
Message-ID: <20100831143839.GC16034@foucault.redhat.com> (raw)
In-Reply-To: <AANLkTinx_Y1iUt9tj4io=GskwRyvK2EdWv9cO9gAbxBS@mail.gmail.com>

On Tue, Aug 31, 2010 at 11:29:02AM +1000, Nguyen Thai Ngoc Duy wrote:
> On Tue, Aug 31, 2010 at 7:17 AM, Luke Kenneth Casson Leighton
> <luke.leighton@gmail.com> wrote:
> > On Mon, Aug 30, 2010 at 8:59 PM,  <cdahlin@redhat.com> wrote:
> >> From: Casey Dahlin <cdahlin@redhat.com>
> >>
> >> This isn't really what I'd normally call ready for public consumption, but
> >> since there's been some minimal list chatter on a similar subject I figured I'd
> >> put this out there early.
> >>
> >> git-hive is a peer to peer service for exchanging branches. When started it
> >> runs a small daemon to publish your repository on a random (or specified) port.
> >> Two hive daemons connected to oneanother can exchange branch lists and
> >> introduce eachother to more hive daemons to widen the network.
> >
> >  p.s. is there any location where, in diagrammatic form, the
> > protocol's described?
> 
> Also a short tutorial how to use it would be nice.
> 
> I take it I can put different repositories (say wine.git and git.git)
> in the hive. When I fetch git.git from the hive, it won't fetch
> wine.git?

First step to using hive is to set the project uri for your repo (may change
this to a different mechanism later).

	casey@host_a$ git config --add hive.uri http://myproject.org

This is what prevents the scenario you describe; repos with the same project
URI are assumed to be compatible. It can be given as a command line argument to
'git hive start', but this way is much more usable.

Next we start the service for our repo.

	casey@host_a$ git hive start --listen-port 21121

Normally the listen port is selected randomly. We specify it here so that other
hive users can explicitly connect to us and "bootstrap" themselves into the
hive network.

Now to have someone join.

	nguyen@host_b$ git config --add hive.uri http://myproject.org
	nguyen@host_b$ git hive start host_a.com:21121

So from host_b we specify host_a's address and listen port, and we join the
network. From here on out anyone who also connects to host_a will get host_b's
(randomly selected) listen port automatically and be able to connect to it as
well.

So now our two peers can see each other.

	casey@host_a$ git hive show --branches
	Nguyen Thai Ngoc Duy <pclouds@gmail.com>
		master
		for_casey
	
	---

	nguyen@host_b$ git hive show --branches
	Casey Dahlin <cdahlin@redhat.com>
		master
		stable
		v2.1

And we can exchange them

	casey@host_a$ git hive fetch nguyen for_casey
	casey@host_a$ git branch
	* master
	  stable
	  for_casey

Note that the two arguments in fetch are a regex which searches through user
IDs and a branch name, which is why I can abbreviate to just "nguyen" in all
lower case.

--CJD

  reply	other threads:[~2010-08-31 14:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 19:59 [RFC PATCH] Introduce git-hive cdahlin
2010-08-30 21:17 ` Luke Kenneth Casson Leighton
2010-08-31  1:29   ` Nguyen Thai Ngoc Duy
2010-08-31 14:38     ` Casey Dahlin [this message]
2010-08-31 15:08       ` Luke Kenneth Casson Leighton
2010-08-31 15:52         ` Casey Dahlin
2010-08-31 16:47           ` Luke Kenneth Casson Leighton
2010-08-31 17:20             ` Casey Dahlin
     [not found]           ` <815C806E-E7DC-4B7D-9B45-4C9B289DFEEF@sb.org>
2010-08-31 19:19             ` Casey Dahlin
2010-08-31 19:21               ` Kevin Ballard
2010-08-31 19:25                 ` Casey Dahlin
2010-09-05 20:08                   ` Tomas Carnecky
2010-09-06  2:28                     ` Casey Dahlin
2010-08-31 19:23           ` Kevin Ballard
2010-09-01  3:56       ` Ilari Liusvaara
2010-09-01  4:07         ` Casey Dahlin
2010-09-05 19:48       ` Giuseppe Bilotta
     [not found]       ` <20100905194810.5940F384096@mbox.dmi.unict.it>
2010-09-06  2:25         ` Casey Dahlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100831143839.GC16034@foucault.redhat.com \
    --to=cdahlin@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=luke.leighton@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).