Mercurial > kallithea
diff rhodecode/lib/vcs/backends/git/changeset.py @ 2384:5563af834d92 beta
Added diff option into git and hg changeset objects, representing git formated patch against parent1
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 04 Jun 2012 17:26:34 +0200 |
parents | 4747af4ce203 |
children | 91fae60bf2b6 c9b08fdcb788 |
line wrap: on
line diff
--- a/rhodecode/lib/vcs/backends/git/changeset.py Mon Jun 04 03:55:28 2012 +0200 +++ b/rhodecode/lib/vcs/backends/git/changeset.py Mon Jun 04 17:26:34 2012 +0200 @@ -194,6 +194,11 @@ return _prev(self, branch) + def diff(self, ignore_whitespace=True, context=3): + return ''.join(self.repository.get_diff(self, self.parents[0], + ignore_whitespace=ignore_whitespace, + context=context)) + def get_file_mode(self, path): """ Returns stat mode of the file at the given ``path``.