Index: build/util/lastchange.py |
diff --git a/build/util/lastchange.py b/build/util/lastchange.py |
index a101341ef7d3e176fcebfc08e3b6f6671617be00..cdc87d86111ab3ce2a8980d1fb36f3c177cbeac0 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(sys.argv[0]) |
M-A Ruel
2012/10/25 17:56:01
not always a good idea. In general it's better to
chrisha
2012/10/25 17:59:07
Done.
|
+ |
+ version_info = FetchVersionInfo(opts.default_lastchange, src_dir) |
if version_info.revision == None: |
version_info.revision = '0' |