[utils] Update find-rev utility to take a branch argument (name of the git-svn
branch). llvm-svn: 172740
This commit is contained in:
parent
aa7a3b3e75
commit
8bbf26f59e
|
@ -5,9 +5,9 @@ import os, sys, subprocess
|
||||||
def main():
|
def main():
|
||||||
from optparse import OptionParser, OptionGroup
|
from optparse import OptionParser, OptionGroup
|
||||||
parser = OptionParser("usage: %prog [options] <repo> <revision>")
|
parser = OptionParser("usage: %prog [options] <repo> <revision>")
|
||||||
parser.add_option("", "--dump-section-data", dest="dumpSectionData",
|
parser.add_option("", "--branch", dest="branch",
|
||||||
help="Dump the contents of sections",
|
help="Ref for the branch to search [%default]",
|
||||||
action="store_true", default=False)
|
action="store", default="git-svn")
|
||||||
(opts, args) = parser.parse_args()
|
(opts, args) = parser.parse_args()
|
||||||
|
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
|
@ -21,7 +21,7 @@ def main():
|
||||||
parser.error("invalid revision argument (not an integer)")
|
parser.error("invalid revision argument (not an integer)")
|
||||||
|
|
||||||
os.chdir(repo)
|
os.chdir(repo)
|
||||||
p = subprocess.Popen(['git', 'rev-list', 'git-svn', '--pretty'],
|
p = subprocess.Popen(['git', 'rev-list', opts.branch, '--pretty'],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
|
|
||||||
bestRev = bestCommit = None
|
bestRev = bestCommit = None
|
||||||
|
|
Loading…
Reference in New Issue