Skip to content

Commit

Permalink
Default keep revisions to disabled, and remove tests for revisions
Browse files Browse the repository at this point in the history
This commit sets the "keep revisions" setting to disabled by default
for new projects.  It also removes the test cases associated with
revisions.

The revisions feature as currently implemented is of questionable use.
It has been a source of performance issues for users, and has consumed
developer time in attempts to address its shortcomings.  This commit
is the first step to deprecate the current revisions feature.
  • Loading branch information
gedakc committed Sep 22, 2019
1 parent b473ead commit be35786
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion manuskript/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}

revisions = {
"keep": True,
"keep": False,
"smartremove": True,
"rules": collections.OrderedDict({
10 * 60: 60, # One per minute for the last 10mn
Expand Down
13 changes: 0 additions & 13 deletions manuskript/tests/models/test_outlineItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ def test_outlineItemsProperties(outlineItemFolder, outlineItemText):
text.setData(text.enum.goal, 4)
assert text.data(text.enum.goalPercentage) == .5

# revisions
assert text.data(text.enum.revisions) == []

def test_modelStuff(outlineModelBasic):
"""
Tests with children items.
Expand Down Expand Up @@ -126,16 +123,6 @@ def test_modelStuff(outlineModelBasic):
assert folder.findItemsContaining("VALUE", cols, MW, True) == []
assert folder.findItemsContaining("VALUE", cols, MW, False) == [text2.ID()]

# Revisions
text2.clearAllRevisions()
assert text2.revisions() == []
text2.setData(text2.enum.text, "Some value.")
assert len(text2.revisions()) == 1
text2.setData(text2.enum.text, "Some new value.")
assert len(text2.revisions()) == 1 # Auto clean
text2.deleteRevision(text2.revisions()[0][0])
assert len(text2.revisions()) == 0

# Model, count and copy
k = folder._model
folder.setModel(14)
Expand Down

0 comments on commit be35786

Please sign in to comment.