Mercurial > kallithea
diff rhodecode/lib/vcs/backends/git/repository.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 | e576410f911d |
children | 08fc67c1c948 |
line wrap: on
line diff
--- a/rhodecode/lib/vcs/backends/git/repository.py Mon Jun 04 03:55:28 2012 +0200 +++ b/rhodecode/lib/vcs/backends/git/repository.py Mon Jun 04 17:26:34 2012 +0200 @@ -437,6 +437,12 @@ if ignore_whitespace: flags.append('-w') + if hasattr(rev1, 'raw_id'): + rev1 = getattr(rev1, 'raw_id') + + if hasattr(rev2, 'raw_id'): + rev2 = getattr(rev2, 'raw_id') + if rev1 == self.EMPTY_CHANGESET: rev2 = self.get_changeset(rev2).raw_id cmd = ' '.join(['show'] + flags + [rev2])