Skip to content
This repository was archived by the owner on Aug 24, 2024. It is now read-only.

Commit 27b82c0

Browse files
committed
log more info
1 parent 23c3138 commit 27b82c0

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

migration1/migration1.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ func (m *Migration1) migrate(repo afterrepo.ClockedRepo) error {
3535
continue
3636
}
3737

38+
fmt.Printf("%s: ", streamedBug.Bug.Id().Human())
39+
3840
oldBug := streamedBug.Bug
3941
newBug, changed, err := m.migrateBug(oldBug)
4042
if err != nil {
41-
fmt.Printf("Got error when parsing bug: %q", err)
43+
fmt.Printf("Got error when parsing bug: %q\n", err)
4244
}
4345

4446
// If the bug has been changed, remove the old bug and commit the new one
@@ -54,7 +56,11 @@ func (m *Migration1) migrate(repo afterrepo.ClockedRepo) error {
5456
fmt.Printf("Got error when attempting to remove bug: %q\n", err)
5557
continue
5658
}
59+
60+
fmt.Printf("migrated\n")
61+
continue
5762
}
63+
fmt.Printf("migration not needed\n")
5864
}
5965

6066
return nil

migration2/migration2.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package migration2
22

33
import (
44
"errors"
5+
"fmt"
56

67
afterauth "github.com/MichaelMure/git-bug-migration/migration2/after/bridge/core/auth"
78
afterentity "github.com/MichaelMure/git-bug-migration/migration2/after/entity"
@@ -37,8 +38,11 @@ func (m *Migration2) migrate(oldRepo beforerepo.ClockedRepo, newRepo afterrepo.C
3738
}
3839

3940
for _, cred := range creds {
41+
fmt.Printf("%s: ", cred.ID().Human())
42+
4043
var newCred afterauth.Credential
4144
if afterauth.IdExist(newRepo, afterentity.Id(cred.ID().String())) {
45+
fmt.Printf("already migrated\n")
4246
continue
4347
}
4448

@@ -82,6 +86,8 @@ func (m *Migration2) migrate(oldRepo beforerepo.ClockedRepo, newRepo afterrepo.C
8286
if err != nil {
8387
return err
8488
}
89+
90+
fmt.Printf("migrated\n")
8591
}
8692

8793
return nil

root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ func runRootCmd(env *Env, migrations []Migration) error {
5959
os.Exit(1)
6060
}
6161
}
62-
env.out.Println("Done!")
62+
env.out.Println("\nDone!")
6363
return nil
6464
}

0 commit comments

Comments
 (0)