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

Unified Diff: build/util/lastchange.py

Issue 11266037: Allow lastchange.py to be used for arbitrary repositories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed maruel's nit. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/util/lastchange.py
diff --git a/build/util/lastchange.py b/build/util/lastchange.py
index a101341ef7d3e176fcebfc08e3b6f6671617be00..dba8e54da40f3fdfe2ee6447b0cace0d0ad47526 100755
--- a/build/util/lastchange.py
+++ b/build/util/lastchange.py
@@ -196,6 +196,8 @@ def main(argv=None):
help="write last change to FILE")
parser.add_option("--revision-only", action='store_true',
help="just print the SVN revision number")
+ parser.add_option("-s", "--source-dir", metavar="DIR",
+ help="use repository in the given directory")
opts, args = parser.parse_args(argv[1:])
out_file = opts.output
@@ -208,8 +210,12 @@ def main(argv=None):
parser.print_help()
sys.exit(2)
- version_info = FetchVersionInfo(opts.default_lastchange,
- os.path.dirname(sys.argv[0]))
+ if opts.source_dir:
+ src_dir = opts.source_dir
+ else:
+ src_dir = os.path.dirname(os.path.abspath(__file__))
+
+ version_info = FetchVersionInfo(opts.default_lastchange, src_dir)
if version_info.revision == None:
version_info.revision = '0'
« 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