[Treepkg-commits] r250 - trunk/treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 12 15:27:03 CET 2010
Author: aheinecke
Date: 2010-03-12 15:27:03 +0100 (Fri, 12 Mar 2010)
New Revision: 250
Modified:
trunk/treepkg/git.py
Log:
Cleaner last_changed_revision function
Modified: trunk/treepkg/git.py
===================================================================
--- trunk/treepkg/git.py 2010-03-12 11:04:31 UTC (rev 249)
+++ trunk/treepkg/git.py 2010-03-12 14:27:03 UTC (rev 250)
@@ -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"
More information about the Treepkg-commits
mailing list