Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: appengine/findit/util_scripts/git_checkout/local_git_repository.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 from urlparse import urlparse 7 from urlparse import urlparse
8 import subprocess 8 import subprocess
9 import threading 9 import threading
10 10
11 from git_checkout import local_git_parsers 11 from git_checkout import local_git_parsers
12 from lib.gitiles.git_repository import GitRepository 12 from libs.gitiles.git_repository import GitRepository
13 import script_util 13 import script_util
14 14
15 _CHANGELOG_FORMAT_STRING = ('commit %H%n' 15 _CHANGELOG_FORMAT_STRING = ('commit %H%n'
16 'author %an%n' 16 'author %an%n'
17 'author-mail %ae%n' 17 'author-mail %ae%n'
18 'author-time %ad%n%n' 18 'author-time %ad%n%n'
19 'committer %cn%n' 19 'committer %cn%n'
20 'committer-mail %ce%n' 20 'committer-mail %ce%n'
21 'committer-time %cd%n%n' 21 'committer-time %cd%n%n'
22 '--Message start--%n%B%n--Message end--%n') 22 '--Message start--%n%B%n--Message end--%n')
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ConvertRemoteCommitToLocal(revision), path) 147 ConvertRemoteCommitToLocal(revision), path)
148 output = script_util.GetCommandOutput(self._GetFinalCommand(command)) 148 output = script_util.GetCommandOutput(self._GetFinalCommand(command))
149 return self.blame_parser(output, path, revision) 149 return self.blame_parser(output, path, revision)
150 150
151 def GetSource(self, path, revision): 151 def GetSource(self, path, revision):
152 """Returns source code of the file at ``path`` of the given revision.""" 152 """Returns source code of the file at ``path`` of the given revision."""
153 # Check whether the requested file exist or not. 153 # Check whether the requested file exist or not.
154 command = 'git show %s:%s' % (ConvertRemoteCommitToLocal(revision), path) 154 command = 'git show %s:%s' % (ConvertRemoteCommitToLocal(revision), path)
155 output = script_util.GetCommandOutput(self._GetFinalCommand(command)) 155 output = script_util.GetCommandOutput(self._GetFinalCommand(command))
156 return output 156 return output
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698