codeinn/vcs — Issue #91: gitrepo _get_diff method looks broken
Author: marcinkuzminski
Created: 2011-10-21 23:37:09+00:00
State: open

Got this error from RhodeCode but here's an example that fails.

```python

In [31]: gitrepo._get_diff(1,2,'tests/conf.py')
---------------------------------------------------------------------------
RepositoryError Traceback (most recent call last)
/home/marcink/ in ()
----> 1 gitrepo._get_diff(1,2,'tests/conf.py')

/home/marcink/workspace-python/vcs/vcs/backends/git.pyc in _get_diff(self, rev1, rev2, path)
104 def _get_diff(self, rev1, rev2, path):
105 cmd = 'diff %s %s %s' % (rev1, rev2, path)
--> 106 so, se = self.run_git_command(cmd)
107
108 return so

/home/marcink/workspace-python/vcs/vcs/backends/git.pyc in run_git_command(self, cmd)
99 p.returncode != 0:
100 raise RepositoryError("Couldn't run git command (%s).\n"
--> 101 "stderr:\n%s" % (cmd, se))
102 return so, se
103

RepositoryError: Couldn't run git command (git diff 1 2 tests/conf.py).
stderr:
fatal: ambiguous argument '1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions