On Sun, Aug 29, 2010 at 11:06 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Hi Luke, > > Luke Kenneth Casson Leighton wrote: > >> i need some guidance on what i should be doing, to add peer-to-peer >> networking to "git fetch". i can take care of the peer-to-peer >> networking side: the bit i'm unsure about is what sequence of events >> are required to happen. > > Not sure if this is the best answer or not, but you might enjoy > looking at the git-remote-helpers(7) feature git-remote-helpers - Helper programs to interact with remote repositories okaay, i see where you're going with that one. thanks. > and git-remote-testgit.py > example. have to find that. > Also, in case it is useful: the old scripted "git fetch" is available > as contrib/examples/git-fetch.sh. ahh. ah _ha_. yes. excellent. btw, gitpython interestingly has a 4-line method for working out the list of commits required to be obtained in order for the local copy to catch up: repo_refs = self.git.rev_list(ref, '--').strip().splitlines() other_repo_refs = other_repo.git.rev_list(other_ref, '--').strip().splitlines() diff_refs = list(set(other_repo_refs) - set(repo_refs)) return map(lambda ref: Commit.find_all(other_repo, ref, max_count=1)[0], diff_refs) it's going to be a leeetle more tricky than that, over a p2p network, unless i cheat, and place the other_repo's rev-list into a meta-file which is also distributed over the p2p network.... yuk to that, on the basis that long-living repos that's going to be a biiig file (would that actually be the case? what's the largest "git rev-list --all" that anyone's ever seen? yikes - on git itself it's 860k!) hmmm.. git rev {commit1}...{commit2} might give me what i need (and be equivalent to the above 4 python lines but it can be done by the remote end - that's still potentially a damn big amount of info. well, i'm sure i'll cope :) i just want to get something working, damnit. there simply aren't enough free software client-server-paradigm-independent development tools around, and that's a situation that's causing me some concern. l. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html