Browse Source

s/git-/git /.

Heikki Hokkanen 17 years ago
parent
commit
0fd5e20140
1 changed files with 10 additions and 10 deletions
  1. 10
    10
      gitstats

+ 10
- 10
gitstats View File

137
 		DataCollector.collect(self, dir)
137
 		DataCollector.collect(self, dir)
138
 
138
 
139
 		try:
139
 		try:
140
-			self.total_authors = int(getpipeoutput(['git-log', 'git-shortlog -s', 'wc -l']))
140
+			self.total_authors = int(getpipeoutput(['git log', 'git shortlog -s', 'wc -l']))
141
 		except:
141
 		except:
142
 			self.total_authors = 0
142
 			self.total_authors = 0
143
 		#self.total_lines = int(getoutput('git-ls-files -z |xargs -0 cat |wc -l'))
143
 		#self.total_lines = int(getoutput('git-ls-files -z |xargs -0 cat |wc -l'))
159
 
159
 
160
 		# tags
160
 		# tags
161
 		self.tags = {}
161
 		self.tags = {}
162
-		lines = getpipeoutput(['git-show-ref --tags']).split('\n')
162
+		lines = getpipeoutput(['git show-ref --tags']).split('\n')
163
 		for line in lines:
163
 		for line in lines:
164
 			if len(line) == 0:
164
 			if len(line) == 0:
165
 				continue
165
 				continue
166
 			(hash, tag) = line.split(' ')
166
 			(hash, tag) = line.split(' ')
167
 
167
 
168
 			tag = tag.replace('refs/tags/', '')
168
 			tag = tag.replace('refs/tags/', '')
169
-			output = getpipeoutput(['git-log "%s" --pretty=format:"%%at %%an" -n 1' % hash])
169
+			output = getpipeoutput(['git log "%s" --pretty=format:"%%at %%an" -n 1' % hash])
170
 			if len(output) > 0:
170
 			if len(output) > 0:
171
 				parts = output.split(' ')
171
 				parts = output.split(' ')
172
 				stamp = 0
172
 				stamp = 0
178
 
178
 
179
 		# Collect revision statistics
179
 		# Collect revision statistics
180
 		# Outputs "<stamp> <author>"
180
 		# Outputs "<stamp> <author>"
181
-		lines = getpipeoutput(['git-rev-list --pretty=format:"%at %an" HEAD', 'grep -v ^commit']).split('\n')
181
+		lines = getpipeoutput(['git rev-list --pretty=format:"%at %an" HEAD', 'grep -v ^commit']).split('\n')
182
 		for line in lines:
182
 		for line in lines:
183
 			# linux-2.6 says "<unknown>" for one line O_o
183
 			# linux-2.6 says "<unknown>" for one line O_o
184
 			parts = line.split(' ')
184
 			parts = line.split(' ')
270
 		# TODO Optimize this, it's the worst bottleneck
270
 		# TODO Optimize this, it's the worst bottleneck
271
 		# outputs "<stamp> <files>" for each revision
271
 		# outputs "<stamp> <files>" for each revision
272
 		self.files_by_stamp = {} # stamp -> files
272
 		self.files_by_stamp = {} # stamp -> files
273
-		revlines = getpipeoutput(['git-rev-list --pretty=format:"%at %T" HEAD', 'grep -v ^commit']).strip().split('\n')
273
+		revlines = getpipeoutput(['git rev-list --pretty=format:"%at %T" HEAD', 'grep -v ^commit']).strip().split('\n')
274
 		lines = []
274
 		lines = []
275
 		for revline in revlines:
275
 		for revline in revlines:
276
 			time, rev = revline.split(' ')
276
 			time, rev = revline.split(' ')
291
 
291
 
292
 		# extensions
292
 		# extensions
293
 		self.extensions = {} # extension -> files, lines
293
 		self.extensions = {} # extension -> files, lines
294
-		lines = getpipeoutput(['git-ls-files']).split('\n')
294
+		lines = getpipeoutput(['git ls-files']).split('\n')
295
 		self.total_files = len(lines)
295
 		self.total_files = len(lines)
296
 		for line in lines:
296
 		for line in lines:
297
 			base = os.path.basename(line)
297
 			base = os.path.basename(line)
315
 		#  N files changed, N insertions (+), N deletions(-)
315
 		#  N files changed, N insertions (+), N deletions(-)
316
 		# <stamp> <author>
316
 		# <stamp> <author>
317
 		self.changes_by_date = {} # stamp -> { files, ins, del }
317
 		self.changes_by_date = {} # stamp -> { files, ins, del }
318
-		lines = getpipeoutput(['git-log --shortstat --pretty=format:"%at %an"']).split('\n')
318
+		lines = getpipeoutput(['git log --shortstat --pretty=format:"%at %an"']).split('\n')
319
 		lines.reverse()
319
 		lines.reverse()
320
 		files = 0; inserted = 0; deleted = 0; total_lines = 0
320
 		files = 0; inserted = 0; deleted = 0; total_lines = 0
321
 		for line in lines:
321
 		for line in lines:
379
 		try:
379
 		try:
380
 			res = self.cache['files_in_tree'][rev]
380
 			res = self.cache['files_in_tree'][rev]
381
 		except:
381
 		except:
382
-			res = int(getpipeoutput(['git-ls-tree -r --name-only "%s"' % rev, 'wc -l']).split('\n')[0])
382
+			res = int(getpipeoutput(['git ls-tree -r --name-only "%s"' % rev, 'wc -l']).split('\n')[0])
383
 			if 'files_in_tree' not in self.cache:
383
 			if 'files_in_tree' not in self.cache:
384
 				self.cache['files_in_tree'] = {}
384
 				self.cache['files_in_tree'] = {}
385
 			self.cache['files_in_tree'][rev] = res
385
 			self.cache['files_in_tree'][rev] = res
393
 		return datetime.datetime.fromtimestamp(self.last_commit_stamp)
393
 		return datetime.datetime.fromtimestamp(self.last_commit_stamp)
394
 	
394
 	
395
 	def getTags(self):
395
 	def getTags(self):
396
-		lines = getpipeoutput(['git-show-ref --tags', 'cut -d/ -f3'])
396
+		lines = getpipeoutput(['git show-ref --tags', 'cut -d/ -f3'])
397
 		return lines.split('\n')
397
 		return lines.split('\n')
398
 	
398
 	
399
 	def getTagDate(self, tag):
399
 	def getTagDate(self, tag):
412
 		return self.total_lines
412
 		return self.total_lines
413
 	
413
 	
414
 	def revToDate(self, rev):
414
 	def revToDate(self, rev):
415
-		stamp = int(getpipeoutput(['git-log --pretty=format:%%at "%s" -n 1' % rev]))
415
+		stamp = int(getpipeoutput(['git log --pretty=format:%%at "%s" -n 1' % rev]))
416
 		return datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d')
416
 		return datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d')
417
 
417
 
418
 class ReportCreator:
418
 class ReportCreator: