/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 breezy/shelf_ui.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-12 02:03:26 UTC
  • mto: (6885.7.1 fix-commit-builder)
  • mto: This revision was merged to the branch mainline in revision 6891.
  • Revision ID: jelmer@jelmer.uk-20180312020326-r2wf6v22b52hhm59
Add find_previous_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
            self.change_editor.finish()
232
232
        self.work_tree.unlock()
233
233
 
234
 
    def get_parsed_patch(self, file_id, invert=False):
 
234
    def get_parsed_patch(self, file_id, paths, invert=False):
235
235
        """Return a parsed version of a file's patch.
236
236
 
237
237
        :param file_id: The id of the file to generate a patch for.
250
250
        new_path = new_tree.id2path(file_id)
251
251
        text_differ = diff.DiffText(old_tree, new_tree, diff_file,
252
252
            path_encoding=osutils.get_terminal_encoding())
253
 
        patch = text_differ.diff(file_id, old_path, new_path, 'file', 'file')
 
253
        patch = text_differ.diff(file_id, paths[0], paths[1], 'file', 'file')
254
254
        diff_file.seek(0)
255
255
        return patches.parse_patch(diff_file)
256
256