llvm.org GIT mirror llvm / f6893dd
[utils] Update find-rev utility to take a branch argument (name of the git-svn branch). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172740 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 7 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
44 def main():
55 from optparse import OptionParser, OptionGroup
66 parser = OptionParser("usage: %prog [options] ")
7 parser.add_option("", "--dump-section-data", dest="dumpSectionData",
8 help="Dump the contents of sections",
9 action="store_true", default=False)
7 parser.add_option("", "--branch", dest="branch",
8 help="Ref for the branch to search [%default]",
9 action="store", default="git-svn")
1010 (opts, args) = parser.parse_args()
1111
1212 if len(args) != 2:
2020 parser.error("invalid revision argument (not an integer)")
2121
2222 os.chdir(repo)
23 p = subprocess.Popen(['git', 'rev-list', 'git-svn', '--pretty'],
23 p = subprocess.Popen(['git', 'rev-list', opts.branch, '--pretty'],
2424 stdout=subprocess.PIPE)
2525
2626 bestRev = bestCommit = None