hackergrrl / hypergit

Manage and clone peer-to-peer git repositories.
206 stars 9 forks source link

seeding many #11

Closed staltz closed 6 years ago

staltz commented 6 years ago

It seems like I can't hypergit seed in one terminal and hypergit seed in another, the same port is used.

hackergrrl commented 6 years ago

Aye, yes, there's a TODO if I've ever seen one.

TODO: use e.g. getport when setting up the swarm

billiegoose commented 6 years ago

wait, why would you run two seed processes? Is it one seed process per repo?

billiegoose commented 6 years ago

also... how do I know if seeding is working? (Is that why you're running two processes?)

hackergrrl commented 6 years ago

@wmhilton the console tells you when it's replicating with others

billiegoose commented 6 years ago

Hmm. I guess I should redirect that to a log file if I'm running it as a background service then.

hackergrrl commented 6 years ago

@wmhilton then maybe you have to worry about rotating those log files -- see how complicated bg processes get! :)

billiegoose commented 6 years ago

I just delete the log file on service restart. Log file rotation can always be done with a third party tool like logrotate.

billiegoose commented 6 years ago

Also, you never answered my first question - why would you run hypergit seed twice?

hackergrrl commented 6 years ago

@wmhilton I'm not sure why @staltz wanted to run two. I suggested the getport change so that other local services that might use the same port don't break hypergit.

staltz commented 6 years ago

Actually in my opinion we could close this issue because when I opened it I didn't know that hypergit seed was looking at ~/.hypergit and seed all, I thought it was seeding only the one in the cwd.

vweevers commented 6 years ago

The readme does suggest hypergit only seeds the repo in the cwd: "seed - Actively share this repo with other peers".

billiegoose commented 6 years ago

Yes, I thought maybe I was misunderstanding something because of the conflict between what's in usage.txt and what I observed the code doing. I suggest we change the language in usage.txt and README to reflect the fact that it seeds ALL the repos. Which I think is the perfectly logical behavior... I don't want to micro-manage which repos are actively seeding (obviously, given my desire to automate it as a background service)... but if we wanted the ability to selectively seed we should add that as a new feature so as not to break the current behavior of hypergit seed.

hackergrrl commented 6 years ago

Oh shoot, you're right. I can see the confusion: hypergit seed used to seed just the current repo. Then I centralized the repos to ~/.config/hypergit. Let's update the usage & readme!

hackergrrl commented 6 years ago

Done!