Closed Bug 650882 Opened 13 years ago Closed 13 years ago

port hgtool to mozharness

Categories

(Release Engineering :: Applications: MozharnessCore, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: mozilla)

References

Details

(Whiteboard: [mozharness][automation])

Attachments

(1 file)

This should make mozharness' mercurial actions standardized and more robust.
Blocks: 651974
Assignee: nobody → aki
* port hgtool in a completely backwards compatible way
* port hgtool to work naturally in the mozharness framework
* port hgtool with an eye towards clean and maintainable code

Right now it's looking like we need to choose two.
I'm thinking about the latter two... keep the same functionality but break some direct hgtool/util.hg backwards compatibility.
The diff is probably too large to be helpful.
This is basically an |hg diff -r default| from the tip of the 0.4-devel branch in my talosrunner user repo.  It may be easiest to look at the source:

http://hg.mozilla.org/users/asasaki_mozilla.com/talosrunner/file/896b5368ad7d/scripts/sourcetool.py

I was able to successfully:

 scripts/hgtool.py http://hg.mozilla.org/build/buildbotcustom ../foo

and

 scripts/hgtool.py -s ~/src/clean/buildbotcustom http://hg.mozilla.org/build/buildbotcustom ../foo
Attachment #528768 - Flags: feedback?(rail)
Attachment #528768 - Flags: feedback?(catlee)
All unit tests from build/tools/lib/python/buildtools/test/test_util_hg.py are ported as of http://hg.mozilla.org/users/asasaki_mozilla.com/talosrunner/rev/36e76a3e6fd9 .
Comment on attachment 528768 [details] [diff] [review]
huge diff; working hgtool.py

Some nits:
* as you said in the comments it would be better to remove env variables
* url = "%s/rev/%s" % (c['vcs_repo'], got_revision) looks HG specific, probably you may want to wrap it in the future, something like vcs.get_url(...)
* vcs or scm? :p

BTW, there are a lot of functions from build/tools. We need to switch to mozharness to prevent more divergence in the future.
Attachment #528768 - Flags: feedback?(rail) → feedback+
Attachment #528768 - Flags: feedback?(catlee)
hgtool-in-mozharness will be landing as part of the 0.4 landing (bug 651974).
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
Component: Other → Mozharness
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: