add staggered versioner

This commit is contained in:
Alexander Graf
2014-08-22 00:41:17 +02:00
parent 63203aa14c
commit 2b3359dff3
5 changed files with 395 additions and 12 deletions

View File

@@ -47,11 +47,15 @@ func NewSimple(repoID, repoPath string, params map[string]string) Versioner {
// nil, the named file does not exist any more (has been archived).
func (v Simple) Archive(filePath string) error {
_, err := os.Stat(filePath)
if err != nil && os.IsNotExist(err) {
if debug {
l.Debugln("not archiving nonexistent file", filePath)
if err != nil {
if os.IsNotExist(err) {
if debug {
l.Debugln("not archiving nonexistent file", filePath)
}
return nil
} else {
return err
}
return nil
}
versionsDir := filepath.Join(v.repoPath, ".stversions")