This reverts commit 6d3f9d5154.
This commit is contained in:
@@ -122,10 +122,6 @@ func (f FileInfo) WinsConflict(other FileInfo) bool {
|
||||
return f.Version.Compare(other.Version) == ConcurrentGreater
|
||||
}
|
||||
|
||||
func (f FileInfo) IsEmpty() bool {
|
||||
return f.Version.Counters == nil
|
||||
}
|
||||
|
||||
func (f *FileInfo) Invalidate(invalidatedBy ShortID) {
|
||||
f.Invalid = true
|
||||
f.ModifiedBy = invalidatedBy
|
||||
@@ -133,23 +129,6 @@ func (f *FileInfo) Invalidate(invalidatedBy ShortID) {
|
||||
f.Sequence = 0
|
||||
}
|
||||
|
||||
func (f *FileInfo) InvalidatedCopy(invalidatedBy ShortID) FileInfo {
|
||||
copy := *f
|
||||
copy.Invalidate(invalidatedBy)
|
||||
return copy
|
||||
}
|
||||
|
||||
func (f *FileInfo) DeletedCopy(deletedBy ShortID) FileInfo {
|
||||
copy := *f
|
||||
copy.Size = 0
|
||||
copy.ModifiedBy = deletedBy
|
||||
copy.Deleted = true
|
||||
copy.Version = f.Version.Update(deletedBy)
|
||||
copy.Sequence = 0
|
||||
copy.Blocks = nil
|
||||
return copy
|
||||
}
|
||||
|
||||
func (b BlockInfo) String() string {
|
||||
return fmt.Sprintf("Block{%d/%d/%d/%x}", b.Offset, b.Size, b.WeakHash, b.Hash)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user