Support for locking, unlocking, interruption, cleanup. #45 #114

This commit is contained in:
Andrey Smirnov
2014-10-03 01:34:22 +04:00
parent a356f3dff9
commit ad11053412
6 changed files with 81 additions and 11 deletions

View File

@@ -20,6 +20,11 @@ func aptlyMirrorDrop(cmd *commander.Command, args []string) error {
return fmt.Errorf("unable to drop: %s", err)
}
err = repo.CheckLock()
if err != nil {
return fmt.Errorf("unable to drop: %s", err)
}
force := context.flags.Lookup("force").Value.Get().(bool)
if !force {
snapshots := context.CollectionFactory().SnapshotCollection().ByRemoteRepoSource(repo)