Move FindSnapshot, make Repository.List() return IDs

This commit is contained in:
Alexander Neumann 2015-05-17 20:48:59 +02:00
parent cf37b619fd
commit 6e38a8a033
12 changed files with 75 additions and 97 deletions

View file

@ -6,7 +6,6 @@ import (
"path/filepath"
"github.com/restic/restic"
"github.com/restic/restic/backend"
)
type CmdRestore struct{}
@ -40,12 +39,7 @@ func (cmd CmdRestore) Execute(args []string) error {
return err
}
name, err := backend.FindSnapshot(s, args[0])
if err != nil {
errx(1, "invalid id %q: %v", args[0], err)
}
id, err := backend.ParseID(name)
id, err := restic.FindSnapshot(s, args[0])
if err != nil {
errx(1, "invalid id %q: %v", args[0], err)
}