~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Aaron Bentley
  • Date: 2009-08-14 16:12:47 UTC
  • mto: (4603.1.22 shelve-editor)
  • mto: This revision was merged to the branch mainline in revision 4795.
  • Revision ID: aaron@aaronbentley.com-20090814161247-33pga4kq3qdzjn0k
Implement DiffFromTool.edit_file

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
            differ = diff.DiffFromTool.from_string('gvimdiff -f -o',
181
181
                                                   old_tree, new_tree,
182
182
                                                   sys.stdout)
183
 
            differ.force_temp = True
184
 
            differ.allow_write = True
185
183
            try:
186
184
                for change in creator.iter_shelvable():
187
185
                    if change[0] == 'modify text':
336
334
        return lines, change_count
337
335
 
338
336
    def _edit_file(self, creator, file_id, differ):
339
 
        old_path = differ.old_tree.id2path(file_id)
340
 
        new_path = differ.new_tree.id2path(file_id)
341
 
        differ.diff(file_id, old_path, new_path, 'file', 'file')
342
 
        lines = osutils.split_lines(differ.read_new_file(new_path))
 
337
        lines = osutils.split_lines(differ.edit_file(file_id))
343
338
        return lines, len(lines)
344
339
 
345
340