aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-10-06 06:47:10 -0400
committerW. Trevor King <wking@drexel.edu>2009-10-06 06:47:10 -0400
commit5ccc639e7c04abc97db15eb15677a256e9400b44 (patch)
treeed3d250b258023ec9cc154b5843a90ae75d517f3
parent5323cc1ba94095938c54a2853a3827c14b420e66 (diff)
downloadbugseverywhere-5ccc639e7c04abc97db15eb15677a256e9400b44.tar.gz
Oops, fixed return typo in libbe.darcs.Darcs._vcs_get_file_contents()
For self.parsed_version[0] >= 2, was returning the entire output of ._u_invoke_client() (status, output, and error). Now it just returns the output, which is what we want. This fixes Chris' failed test: ====================================================================== FAIL: Should get file contents as committed to specified revision. ---------------------------------------------------------------------- Traceback (most recent call last): File "libbe/vcs.py", line 852, in test_revision_file_contents_as_committed self.test_contents['rev_1'], committed_contents) AssertionError: 'Lorem ipsum' != (0, 'Lorem ipsum', '') ----------------------------------------------------------------------
-rw-r--r--libbe/darcs.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/libbe/darcs.py b/libbe/darcs.py
index a46403c..9115886 100644
--- a/libbe/darcs.py
+++ b/libbe/darcs.py
@@ -97,20 +97,20 @@ class Darcs(vcs.VCS):
def _vcs_get_file_contents(self, path, revision=None, binary=False):
if revision == None:
return vcs.VCS._vcs_get_file_contents(self, path, revision,
- binary=binary)
+ binary=binary)
else:
if self.parsed_version[0] >= 2:
- return self._u_invoke_client("show", "contents", "--patch", revision, path)
+ status,output,error = self._u_invoke_client( \
+ "show", "contents", "--patch", revision, path)
+ return output
else:
# Darcs versions < 2.0.0pre2 lack the "show contents" command
- status,output,error = self._u_invoke_client("diff", "--unified",
- "--from-patch",
- revision, path)
+ status,output,error = self._u_invoke_client( \
+ "diff", "--unified", "--from-patch", revision, path)
major_patch = output
- status,output,error = self._u_invoke_client("diff", "--unified",
- "--patch",
- revision, path)
+ status,output,error = self._u_invoke_client( \
+ "diff", "--unified", "--patch", revision, path)
target_patch = output
# "--output -" to be supported in GNU patch > 2.5.9