# HG changeset patch # User Andre Heinecke # Date 1268404023 0 # Node ID 77d0f8a4e83896d8d56c6065c8a8987908e94fed # Parent ef983263b8758772eadee75115d43f73caacedde Cleaner last_changed_revision function diff -r ef983263b875 -r 77d0f8a4e838 treepkg/git.py --- a/treepkg/git.py Fri Mar 12 11:04:31 2010 +0000 +++ b/treepkg/git.py Fri Mar 12 14:27:03 2010 +0000 @@ -41,11 +41,9 @@ cwd=src) def last_changed_revision(git_working_copy): - """Return the last changed revision of a Git branch - as an incrementing Number""" + """Return the number of commits in the current branch""" output = run.capture_output(cmdexpand("/bin/bash -c \ - \"git rev-list local | nl | tail -n 1 | \ - awk \'{print $$1}\'\"" + \"git rev-list local | wc -l \"" , **locals()), cwd=git_working_copy) if output is None: raise GitError("Cannot determine last changed revision for %r"