Basic support for synchronizing multiple repositories (fixes #35)

This commit is contained in:
Jakob Borg
2014-03-29 18:53:48 +01:00
parent 2a5c0646c0
commit 5eb5a056bf
18 changed files with 492 additions and 302 deletions

View File

@@ -78,8 +78,8 @@ func prtIndex(files []protocol.FileInfo) {
}
}
func (m Model) Index(nodeID string, files []protocol.FileInfo) {
log.Printf("Received index")
func (m Model) Index(nodeID string, repo string, files []protocol.FileInfo) {
log.Printf("Received index for repo %q", repo)
if cmd == "idx" {
prtIndex(files)
if get != "" {
@@ -117,8 +117,8 @@ func getFile(f protocol.FileInfo) {
fd.Close()
}
func (m Model) IndexUpdate(nodeID string, files []protocol.FileInfo) {
log.Println("Received index update")
func (m Model) IndexUpdate(nodeID string, repo string, files []protocol.FileInfo) {
log.Printf("Received index update for repo %q", repo)
if cmd == "idx" {
prtIndex(files)
if exit {