this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

don't diff against existing data if performing a resync (#432)

authored by

Whyrusleeping and committed by
GitHub
1e3e99df 644d4f9c

+17 -2
+2 -2
carstore/bs.go
··· 875 875 keepset[c] = true 876 876 oblk, err := bs.Get(ctx, c) 877 877 if err != nil { 878 - return nil, err 878 + return nil, fmt.Errorf("get failed in new tree: %w", err) 879 879 } 880 880 881 881 if err := cbg.ScanForLinks(bytes.NewReader(oblk.RawData()), func(lnk cid.Cid) { ··· 901 901 902 902 oblk, err := bs.Get(ctx, c) 903 903 if err != nil { 904 - return nil, err 904 + return nil, fmt.Errorf("get failed in old tree: %w", err) 905 905 } 906 906 907 907 if err := cbg.ScanForLinks(bytes.NewReader(oblk.RawData()), func(lnk cid.Cid) {
+9
cmd/gosky/sync.go
··· 27 27 Name: "get-repo", 28 28 Usage: "download repo from account's PDS to local file (or '-' for stdout). for hex combine with 'xxd -ps -u -c 0'", 29 29 ArgsUsage: `<at-identifier> [<car-file-path>]`, 30 + Flags: []cli.Flag{ 31 + &cli.StringFlag{ 32 + Name: "host", 33 + }, 34 + }, 30 35 Action: func(cctx *cli.Context) error { 31 36 ctx := context.Background() 32 37 arg := cctx.Args().First() ··· 55 60 xrpcc.Host = ident.PDSEndpoint() 56 61 if xrpcc.Host == "" { 57 62 return fmt.Errorf("no PDS endpoint for identity") 63 + } 64 + 65 + if h := cctx.String("host"); h != "" { 66 + xrpcc.Host = h 58 67 } 59 68 60 69 log.Infof("downloading from %s to: %s", xrpcc.Host, carPath)
+6
repomgr/repomgr.go
··· 769 769 return err 770 770 } 771 771 772 + if rev == nil { 773 + // if 'rev' is nil, this implies a fresh sync. 774 + // in this case, ignore any existing blocks we have and treat this like a clean import. 775 + curhead = cid.Undef 776 + } 777 + 772 778 if rev != nil && *rev != currev { 773 779 // TODO: we could probably just deal with this 774 780 return fmt.Errorf("ImportNewRepo called with incorrect base")