~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to patchsource.py

  • Committer: Michael Ellerman
  • Date: 2006-03-19 04:12:00 UTC
  • mto: (0.3.1 shelf-dev)
  • mto: This revision was merged to the branch mainline in revision 367.
  • Revision ID: michael@ellerman.id.au-20060319041200-7d2852626febc449
Cherry-pick abentley@panoramicfeedback.com-20060316150654-9eabd1c1d7ea804e
from bzrtools: "Fixed checkout handling in Shelve".

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
        # Hack to cope with 0.7 and 0.8 bzr
34
34
        try:
35
 
            from bzrlib.bzrdir import BzrDir
36
 
            self.bzrdir = BzrDir.open_containing(location)[0]
37
 
            self.base = self.bzrdir.open_branch().base
 
35
            from bzrlib.workingtree import WorkingTree
 
36
            self.wt = WorkingTree.open_containing(location)[0]
 
37
            self.base = self.wt.basedir
38
38
            self.__readlines = self._v08_readlines
39
39
        except ImportError:
40
40
            from bzrlib.branch import Branch
64
64
        tmp = sys.stdout
65
65
        sys.stdout = output
66
66
        # FIXME diff_cmd_helper() should take an output parameter
67
 
        diff_cmd_helper(self.bzrdir.open_workingtree(), self.file_list,
68
 
                    external_diff_options=None, old_revision_spec=self.revision)
 
67
        diff_cmd_helper(self.wt, self.file_list, external_diff_options=None,
 
68
                        old_revision_spec=self.revision)
69
69
        sys.stdout = tmp