Bug 1386040 - Write .purgecaches sentinels during |mach watch|. r=gps

Right now, the "restart flow" that combines |mach watch| with the
Quick-Restart Firefox for Desktop shortcut key is frustrated by
inconsistencies writing the .purgecaches sentinels for the
application.  This commit uses recent work from
https://bugzilla.mozilla.org/show_bug.cgi?id=1368699 to write the
sentinels each time |mach watch| updates the object directory.

MozReview-Commit-ID: 62Aa85oT1SE

--HG--
extra : rebase_source : 746bbe5c6f1555e8b729cbbbc1f8ca57110ae9ba
This commit is contained in:
Nick Alexander 2018-01-19 14:40:51 -08:00
Родитель a396e6b9fa
Коммит 4bc7052253
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -21,6 +21,9 @@ from mozpack.manifests import (
from mozpack.copier import (
FileCopier,
)
from mozbuild.backend import (
get_backend_class,
)
# Watchman integration cribbed entirely from
# https://github.com/facebook/watchman/blob/19aebfebb0b5b0b5174b3914a879370ffc5dac37/python/bin/watchman-wait
@ -275,6 +278,14 @@ class Daemon(object):
yield change
def watch(self, verbose=True):
for change in self.output_changes(verbose=verbose):
pass
try:
active_backend = self.config_environment.substs.get('BUILD_BACKENDS', [None])[0]
if active_backend:
backend_cls = get_backend_class(active_backend)(self.config_environment)
except Exception:
backend_cls = None
for change in self.output_changes(verbose=verbose):
# Try to run the active build backend's post-build step, if possible.
if backend_cls:
backend_cls.post_build(self.config_environment, None, 1, False, 0)