diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-13 21:56:34 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-13 21:56:34 -0500 |
commit | e3a48b356ace6bd88f064fb65f16c53dfdc5f8eb (patch) | |
tree | 81c067ec4c6a1350db56185b386a0409597b300c /libbe/storage/vcs/git.py | |
parent | c83e48bb2e8ae304f629d7d6ae47fb97b5b325ff (diff) | |
download | bugseverywhere-e3a48b356ace6bd88f064fb65f16c53dfdc5f8eb.tar.gz |
Move Darcs over to Storage format.
We have to work around the same issue as mercurial (hg) issue 618. I
can't find a Darcs bug report for this, but it's been fixed somewhere
between 1.0.9 and 2.3.1.
Example scripts demonstrating the bug:
$ darcs=/usr/bin/darcs
$ mkdir x; cd x; $darcs init; echo a > b; $darcs add b; \
$darcs record --all --author 'x <a@b.com>' --logfile b; \
echo z>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
echo g>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
cd ..; rm -rf x > /dev/null; $darcs --version
Finished recording patch 'a'
No changes!
No changes!
1.0.9 (release)
And showing it's been fixed:
$ darcs=~/.cabal/bin/darcs
$ mkdir x; cd x; $darcs init; echo a > b; $darcs add b; \
$darcs record --all --author 'x <a@b.com>' --logfile b; \
echo z>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
echo g>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
cd ..; rm -rf x > /dev/null; $darcs --version
Finished recording patch 'a'
Finished recording patch 'z'
Finished recording patch 'g'
2.3.1 (release)
Diffstat (limited to 'libbe/storage/vcs/git.py')
-rw-r--r-- | libbe/storage/vcs/git.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbe/storage/vcs/git.py b/libbe/storage/vcs/git.py index 6d240c2..29abda7 100644 --- a/libbe/storage/vcs/git.py +++ b/libbe/storage/vcs/git.py @@ -143,12 +143,12 @@ class Git(base.VCS): if error.startswith("fatal: ambiguous argument 'HEAD': unknown "): return None raise base.CommandError(args, status, stderr=error) - commits = output.splitlines() + revisions = output.splitlines() try: if index > 0: - return commits[index-1] + return revisions[index-1] elif index < 0: - return commits[index] + return revisions[index] else: return None except IndexError: |