Changes

Jump to: navigation, search

Auto-tools/Projects/Mozbase

6,633 bytes removed, 16:54, 20 February 2014
Mirroring to Mozilla-Central
* wlach
=== Mirroring to Mozbase use in Mozilla-Central ===
A copy of The mozbase packages are installed into [https://githubdeveloper.commozilla.org/en-US/docs/Python/Virtualenv#The_Mozilla-Central_Virtualenv the mozilla/mozbase mozbase-central virtualenv] is mirrored to instance via the [http://hgmxr.mozilla.org/mozilla-central /source/build/virtualenv/populate_virtualenv.py populate_virtualenv.py] script. The Mozbase [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/packages.txt packages.txt] for use by software there: file is included from the master [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/ packages.txt packages.txt] file and includes all Mozbase packages (really, directories) in mozilla-central via [http://docs.python.org/2/library/site.html .pth files].
All commits should be made against the github mozbase repository first. After a patch lands on github, it may be selectively applied to m-c in the case of urgent, isolated fixes/additions. In general though, we try to keep mozbase in sync between mozilla-central and github through a mirroring process. The various Mozbase packages are mirrored from released versions:https://wiki.used in mozilla.org/Auto-tools/Projects/MozBase#Versioning . Abug should be filed to mirror the appropriate package stating thereason the package should be mirrored. When appropriate, mozbasepackages should be mirrored on version bump (central python code; see [[#Versioning]]). Since several packages in mozbase are dependent on other mozbasepackages, care must be taken to ensure that the versions of thepackages on m-c are kept compatible with each other. All packagesdependent on the package to be mirrored should also version-bumped andmirrored. Similarly, if any of the packages that the package to bemirrored depends on have not already been mirrored to m-c, theseshould also be mirrored to maintain intra-compatability.Python | MDN https://developer.mozilla.org/en-US/docs/Python#Python_in_Mozilla-Central Mozbase tests are run during the make check build step (see {{bug|790765}}). In addition, care must be taken not to break existing in-tree test harnesses which make use of Mozbase. In general, the full set of unittests should be run on all platforms on Tryserver to ensure that there is no breakage; however, in cases where the developer knows that only a subset of these will suffice for this end, a full try run is not required. ==== Using generate_diff.py ==== A script has been written to aid with mozbase package mirrroring:[http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/generate_diff.py generate_diff.py] .This script: * ensures that your copy of mozilla-central is clean. This means no outstanding changes and no untracked files in [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/ testing/mozbase]. Because `generate_diff.py` manipulates the repository using `hg`, this is necessary.* clones a fresh copy of the [https://github.com/mozilla/mozbase mozbase repository]* ensures that the tags associated with the specified packages and associated versions exist* checks that the versions specified are internally consistent with what is in mozilla-central And if everything looks good... * generates a diff that will upgrade the specified packages to the specified versions. Unless specified with `-o`, the output will be in the current working directory named after the hash tag of the git repo HEAD* updates http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/packages.txt which is used via [http://mxr.mozilla.org/mozilla-central/source/build/virtualenv/populate_virtualenv.py populate_virtualenv.py] to add the mozbase packages to the mozilla-central [https://developer.mozilla.org/en-US/docs/Python/Virtualenv virtualenv] via [http://docs.python.org/2/install/index.html#modifying-python-s-search-path .pth] files '''--develop''': Often it is the case that one or more packages should have their versions bumped prior to mirroring to extensively throughout mozilla-central. Since, typically, `generate_diff.py` operates only on tags associated with released versions, it is difficult to stage a patch to be mirrored to ensure that no further work is necessary prior to version bump. To this end, `generate_diff.py` has a flag, `--develop`, that will mirror the packages from the master `HEAD` if a version is not specifically supplied on the command line. This has the additional advantage in that, following tagging, the command line may be reusable from the `--develop` case since without this flag the latest version of the package is chosen if not specified. '''Usage:'''  generate_diff.py [options] package1[=version1] <package2=version2> <...> ''(as displayed with: `generate_diff.py --help`)'' '''Example:'''  │./generate_diff.py mozcrash=0.3 Cloning into 'mozbase'... remote: Counting objects: 3883, done. remote: Compressing objects: 100% (1746/1746), done. remote: Total 3883 (delta 2198), reused 3773 (delta 2105) Receiving objects: 100% (3883/3883), 1.16 MiB | 241 KiB/s, done. Resolving deltas: 100% (2198/2198), done. Note: checking out 'mozcrash-0.3'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 1634023... Bug 813132 - support tbpl friendly output from mozcrash and python 2.4 HEAD is now at 1634023... Bug 813132 - support tbpl friendly output from mozcrash and python 2.4 removing testing/mozbase/mozcrash/README.md undeleting testing/mozbase/mozcrash/README.md reverting testing/mozbase/mozcrash/mozcrash/__init__.py reverting testing/mozbase/mozcrash/mozcrash/mozcrash.py reverting testing/mozbase/mozcrash/setup.py Diff at /home/jhammel/mozilla/src/mozilla-central/testing/mozbase/1634023250af1cb9bce9ccbf9dfe620e4a95c970.diff ==== Mirroring Non-packaged Resources ==== Mozbase has [[#Scripts]] and other files which are mirrored to mozilla-central: * ''README'' : brief overview of the role of mozbase and associated links* [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/setup_development.py setup_development.py] : included for development purposes and used by [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/generate_diff.py generate_diff.py]* [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/including test-manifest.ini test-manifest.ini] : mozbase test manifestharnesses, in the format of https://github.com/mozilla/mozbase/blob/master/manifestdestiny/README.md* [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/test.py test.py] : mozbase test runner, see [[#Tests]] Currently the mirroring methodology for non-packaged resources is manual: generate a diff vs mozilla-central by copying files from a clone of the [https://github.com/mozilla/mozbase mozbase tree] of the desired files to a mozilla-central clone tools and upload it to a bug. ==== Mozbase in Mozilla-Central ==== The mirrored mozbase packages are installed into [https://developer.mozilla.org/en-US/docs/Python/Virtualenv#The_Mozilla-Central_Virtualenv the mozilla-central virtualenv] instance via the [http://mxr.mozilla.org/mozilla-central/source/build/virtualenv/populate_virtualenv.py populate_virtualenv.py] script. The Mozbase [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/packages.txt packages.txt] file is included from the master [http://hg.mozilla.org/mozilla-central/file/0c45e6378f1f/build/virtualenv/packages.txt#l15 packages.txt] file and is generated by [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/generate_diff.py generate_diff.py] to include all Mozbase packages (really, directories) in mozilla-central via [http://docs.python.org/2/library/site.html .pth files]. The various Mozbase packages are used in mozilla-central python code; see https://developer.mozilla.org/en-US/docs/Python#Python_in_Mozilla-Central system itself.
=== Uploading to Puppetagain ===
Confirm
651
edits

Navigation menu