Closed
Bug 1048967
Opened 12 years ago
Closed 12 years ago
Allow version info to run from any directory
Categories
(Testing :: Mozbase, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla34
People
(Reporter: armenzg, Assigned: armenzg)
Details
Attachments
(1 file)
|
933 bytes,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
If I'm inside of mozdevice, then it tries to run hg log mozdevice/setup.py ... which is a non-existent file from my current working directory.
This patch does the trick.
Attachment #8467858 -
Flags: review?(ahalberstadt)
Comment 1•12 years ago
|
||
Comment on attachment 8467858 [details] [diff] [review]
changelog.diff
Review of attachment 8467858 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, just a couple of optional comments. Thanks!
::: testing/mozbase/versioninfo.py
@@ +94,5 @@
>
>
> def main(args=sys.argv[1:]):
> + abspath = os.path.abspath(__file__)
> + dname = os.path.dirname(abspath)
This is fine, but just fyi a common convention we use throughout many of our automation files is to put:
here = os.path.abspath(os.path.dirname(__file__))
at the top of the file.
@@ +95,5 @@
>
> def main(args=sys.argv[1:]):
> + abspath = os.path.abspath(__file__)
> + dname = os.path.dirname(abspath)
> + os.chdir(dname)
Instead of os.chdir, I would probably pass it in to the subprocess.check_output call via the 'cwd' parameter.
Attachment #8467858 -
Flags: review?(ahalberstadt) → review+
| Assignee | ||
Comment 2•12 years ago
|
||
Addressed comments and landed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9fc1fd2a2818
Thanks ahal.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → armenzg
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•