~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transactions.py

  • Committer: wang
  • Date: 2006-10-29 13:41:32 UTC
  • mto: (2104.4.1 wang_65714)
  • mto: This revision was merged to the branch mainline in revision 2109.
  • Revision ID: wang@ubuntu-20061029134132-3d7f4216f20c4aef
Replace python's difflib by patiencediff because the worst case 
performance is cubic for difflib and people commiting large data 
files are often hurt by this. The worst case performance of patience is 
quadratic. Fix bug 65714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Ltd
 
1
# Copyright (C) 2005 Canonical Ltd
2
2
#   Authors: Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
59
59
 
60
60
    def is_clean(self, an_object):
61
61
        """Return True if an_object is clean."""
62
 
        return an_object in self._clean_objects
 
62
        return (an_object in self._clean_objects)
63
63
 
64
64
    def register_clean(self, an_object, precious=False):
65
65
        """Register an_object as being clean.
134
134
 
135
135
    def is_dirty(self, an_object):
136
136
        """Return True if an_object is dirty."""
137
 
        return an_object in self._dirty_objects
 
137
        return (an_object in self._dirty_objects)
138
138
 
139
139
    def register_dirty(self, an_object):
140
140
        """Register an_object as being dirty.