/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/diff.py

  • Committer: Benoît Pierre
  • Date: 2009-11-02 22:06:55 UTC
  • mto: (4603.1.23 shelve-editor)
  • mto: This revision was merged to the branch mainline in revision 4795.
  • Revision ID: benoit.pierre@gmail.com-20091102220655-s31anuaxzfk19u51
Fix edit_diff when using a console command.

Using DiffPath._execute doesn't work because it's redirecting stdout to a file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import difflib
18
18
import os
 
19
from subprocess import call
19
20
import re
20
21
import shutil
21
22
import string
784
785
        new_abs_path = self._prepare_files(file_id, old_path, new_path,
785
786
                                           allow_write_new=True,
786
787
                                           force_temp=True)[1]
787
 
        self._execute(osutils.pathjoin('old', old_path),
788
 
                      osutils.pathjoin('new', new_path))
 
788
        command = self._get_command(osutils.pathjoin('old', old_path),
 
789
                                    osutils.pathjoin('new', new_path))
 
790
        call(command, cwd=self._root)
789
791
        new_file = open(new_abs_path, 'r')
790
792
        try:
791
793
            return new_file.read()