aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/diff.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-27 07:22:01 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-27 07:22:01 -0400
commit2cc6145453fd50fb034e7578362159484ab8e6e7 (patch)
tree9c1145e2d4a79bd92c0a2f54146ed7cbb0c7b6c1 /becommands/diff.py
parent159dc9303e10cef81388fb686f79312cc1018c65 (diff)
downloadbugseverywhere-2cc6145453fd50fb034e7578362159484ab8e6e7.tar.gz
Put bd into read-only mode in becommands/diff.py.
Otherwise comment comparison reads were triggering notice of the None -> EMPTY transition in comment.extra_strings, which was causing a write to disk. This trigger is probably occuring in Bug and BugDir too. Perhaps I should just remove the trigger...
Diffstat (limited to 'becommands/diff.py')
-rw-r--r--becommands/diff.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/becommands/diff.py b/becommands/diff.py
index 1ab2135..b0ef907 100644
--- a/becommands/diff.py
+++ b/becommands/diff.py
@@ -65,6 +65,12 @@ def execute(args, manipulate_encodings=True):
else:
if revision == None: # get the most recent revision
revision = bd.rcs.revision_id(-1)
+ # move bd into memory-only mode to avoid altering disk version.
+ bd.load_all_bugs()
+ for bug in bd:
+ bug.load_settings()
+ bug.load_comments()
+ bd.set_sync_with_disk(False)
old_bd = bd.duplicate_bugdir(revision)
d = diff.Diff(old_bd, bd)
tree = d.report_tree()