/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to diff.py

  • Committer: Jelmer Vernooij
  • Date: 2010-06-04 12:25:04 UTC
  • mfrom: (689.1.1 return-creds)
  • Revision ID: jelmer@samba.org-20100604122504-xe291u8la5uur0ij
Merge credentials fix from John.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
import re
19
19
import sys
20
 
import inspect
21
20
try:
22
21
    from xml.etree.ElementTree import Element, SubElement, tostring
23
22
except ImportError:
525
524
 
526
525
class DiffController(object):
527
526
 
528
 
    def __init__(self, path, patch, window=None, allow_dirty=False):
 
527
    def __init__(self, path, patch, window=None):
529
528
        self.path = path
530
529
        self.patch = patch
531
 
        self.allow_dirty = allow_dirty
532
530
        if window is None:
533
531
            window = DiffWindow(operations=self._provide_operations())
534
532
            self.initialize_window(window)
540
538
 
541
539
    def get_diff_sections(self):
542
540
        yield "Complete Diff", None, ''.join(self.patch)
543
 
        # allow_dirty was added to parse_patches in bzrlib 2.2b1
544
 
        if 'allow_dirty' in inspect.getargspec(parse_patches).args:
545
 
            patches = parse_patches(self.patch, allow_dirty=self.allow_dirty)
546
 
        else:
547
 
            patches = parse_patches(self.patch)
548
 
        for patch in patches:
 
541
        for patch in parse_patches(self.patch):
549
542
            oldname = patch.oldname.split('\t')[0]
550
543
            newname = patch.newname.split('\t')[0]
551
544
            yield oldname, newname, str(patch)