/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2007-12-04 03:54:55 UTC
  • mto: This revision was merged to the branch mainline in revision 3133.
  • Revision ID: aaron.bentley@utoronto.ca-20071204035455-9baojlvaynm0wv5f
Sync up with bzr.dev API changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
 
18
import difflib
18
19
import os
19
20
import errno
20
21
import warnings
1158
1159
        self._last_lines = None
1159
1160
        self._last_lines_revision_id = None
1160
1161
 
1161
 
    @classmethod
1162
 
    def plan_merge_with_base(klass, this, base, other, vf):
1163
 
        old_plan = list(klass(this, base, vf).plan_merge())
1164
 
        new_plan = list(klass(this, other, vf).plan_merge())
1165
 
        return klass._subtract_plans(old_plan, new_plan)
1166
 
 
1167
1162
    def plan_merge(self):
1168
1163
        """Generate a 'plan' for merging the two revisions.
1169
1164
 
1261
1256
 
1262
1257
    @staticmethod
1263
1258
    def _subtract_plans(old_plan, new_plan):
1264
 
        matcher = patiencediff.PatienceSequenceMatcher(None, old_plan,
1265
 
                                                       new_plan)
 
1259
        # Can't use patience diff-- C version doesn't work with tuples
 
1260
        matcher = difflib.SequenceMatcher(None, old_plan, new_plan)
1266
1261
        last_j = 0
1267
1262
        for i, j, n in matcher.get_matching_blocks():
1268
1263
            for jj in range(last_j, j):