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

Side by Side Diff: tools/release/mergeinfo.py

Issue 1033043002: Script to determine in what branch a commit was merged into (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added the requested space Created 5 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2015 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import argparse
7 import os
8 import sys
9
10 from subprocess import call
11
12 def print_analysis(gitWorkingDir, hashToSearch):
13 print '1.) Info'
14 git_execute(gitWorkingDir, ['status'])
15 print '2.) Searching for "' + hashToSearch + '"'
16 print '=====================ORIGINAL COMMIT START====================='
17 git_execute(gitWorkingDir, ['show', hashToSearch])
18 print '=====================ORIGINAL COMMIT END====================='
19 print '#####################FOUND MERGES & REVERTS START#####################'
20 git_execute(gitWorkingDir, ["log",'--all', '--grep='+hashToSearch])
21 print '#####################FOUND MERGES & REVERTS END#####################'
22 print 'Finished successfully'
23
24 def git_execute(workingDir, commands):
25 return call(["git", '-C', workingDir] + commands)
26
27 if __name__ == "__main__": # pragma: no cover
28 parser = argparse.ArgumentParser('Tool to check where a git commit was merged and reverted.')
29 parser.add_argument("-g", "--git-dir", required=False, default='.',
30 help="The path to your git working directory.")
31
32 parser.add_argument('hash', nargs=1, help="Hash of the commit to be searched." )
33
34 args = sys.argv[1:]
35 options = parser.parse_args(args)
36
37 sys.exit(print_analysis(options.git_dir, options.hash[0]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698