Skip to content

Commit 7220418

Browse files
Merge pull request #42 from ipfs/feat/3-to-4
Feat/3 to 4
2 parents fc46b58 + 1405e6b commit 7220418

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
2-
31
install:
42
go install
3+
@echo "fs-repo-migrations now installed, type 'fs-repo-migrations' to run"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ ipfs repo version | go-ipfs versions
4040
----------------- | ----------------
4141
1 | 0.0.0 - 0.2.3
4242
2 | 0.3.0 - 0.3.11
43-
3 | 0.4.0 - current
43+
3 | 0.4.0 - 0.4.2
44+
4 | 0.4.3 - current
4445

4546
### How to Run Migrations
4647

go-migrate/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (f *Flags) Setup() {
1717
flag.BoolVar(&f.Force, "f", false, "whether to force a migration (ignores warnings)")
1818
flag.BoolVar(&f.Revert, "revert", false, "whether to apply the migration backwards")
1919
flag.BoolVar(&f.Verbose, "verbose", false, "enable verbose logging")
20-
flag.StringVar(&f.Path, "path", "", "file path to migrate for fs based migrations")
20+
flag.StringVar(&f.Path, "path", "", "file path to migrate for fs based migrations (required)")
2121
}
2222

2323
func (f *Flags) Parse() {

ipfs-3-to-4/migration/migration.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,16 @@ func revertIpnsEntries(ds dstore.Datastore, oldk dstore.Key, data []byte, mkkey
327327

328328
func transferBlocks(flatfsdir string) error {
329329
var keys []string
330+
dots := 0
330331
filepath.Walk(flatfsdir, func(p string, i os.FileInfo, err error) error {
332+
if dots%200 == 0 {
333+
fmt.Printf("\r \renumerating keys")
334+
}
335+
if dots%40 == 39 {
336+
fmt.Printf(".")
337+
}
338+
dots++
339+
331340
if i.IsDir() {
332341
return nil
333342
}

run.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ cp -r ~/.ipfs ~/.ipfs.bak
2727
## Step 1. Downloading the Migration
2828

2929
- If you have Go installed: `go get -u github.com/ipfs/fs-repo-migrations`
30-
- Otherwise, download a prebuilt binary:
31-
- [Mac OSX](https://gobuilder.me/get/github.com/ipfs/fs-repo-migrations/fs-repo-migrations_master_darwin-amd64.zip)
32-
- [Linux 32bit](https://gobuilder.me/get/github.com/ipfs/fs-repo-migrations/fs-repo-migrations_master_linux-386.zip)
33-
- [Linux 64bit](https://gobuilder.me/get/github.com/ipfs/fs-repo-migrations/fs-repo-migrations_master_linux-amd64.zip)
34-
- [Linux ARM](https://gobuilder.me/get/github.com/ipfs/fs-repo-migrations/fs-repo-migrations_master_linux-arm.zip)
35-
- [Windows 32bit](https://gobuilder.me/get/github.com/ipfs/fs-repo-migrations/fs-repo-migrations_master_windows-386.zip)
36-
- [Windows 64bit](https://gobuilder.me/get/github.com/ipfs/fs-repo-migrations/fs-repo-migrations_master_windows-amd64.zip)
37-
- [See more available builds](https://gobuilder.me/github.com/ipfs/fs-repo-migrations)
30+
- Otherwise, download a prebuilt binary from [the distributions page](https://dist.ipfs.io/#fs-repo-migrations)
3831

3932
## Step 2. Run the Migration
4033

0 commit comments

Comments
 (0)