Closed Bug 1405211 Opened 7 years ago Closed 7 years ago

hg push review fails with: running checkstyle...abort: %1 is not a valid Win32 application

Categories

(MozReview Graveyard :: Integration: Mercurial, defect)

x86_64
Windows 10
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: masayuki, Unassigned)

References

Details

I hit this error when I try to push patches for bug 1404206, one of the patches includes a little change for Android.

I found bug 1304887, but I still see this message with today's tree.

I've never run |./mach bootstrap|, I just use the latest MozillaBuild since running |./mach bootstrap| breaks the environment.
I believe running
> ./mach mercurial-setup --update-only
should fix things for you. Can you try that and let me know?
Flags: needinfo?(masayuki)
Running |./mach mercurial-setup --update-only| causes these error:

> $ ./mach mercurial-setup --update-only
> ================================================================================
> Ensuring https://hg.mozilla.org/hgcustom/version-control-tools is up to date at <path to home folder>/.mozbuild\version-control-tools
> pulling from https://hg.mozilla.org/hgcustom/version-control-tools
> (SHA-1 fingerprint for hg.mozilla.org found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: hg.mozilla.org:fingerprints=sha256:8e:ad:f7:6a:eb:44:06:15:ed:f3:e4:69:a6:64:60:37:2d:ff:98:88:37:bf:d7:b8:40:84:01:48:9c:26:ce:d9)
> searching for changes
> no changes found
> ansible/roles/common/tasks/journald.yml: untracked file differs
> create-environment: untracked file differs
> docs/hgmods/hooks.rst: untracked file differs
> docs/hgmods/index.rst: untracked file differs
> docs/vcssync/development.rst: untracked file differs
> testing/requirements-hgdev.txt: untracked file differs
> testing/vcttesting/environment.py: untracked file differs
> vcssync/prod-requirements.txt: untracked file differs
> vcssync/test-requirements.txt: untracked file differs
> abort: untracked files in working directory differ from files in requested revision
> ================================================================================
> Error running mach:
> 
>     ['mercurial-setup', '--update-only']
> 
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> CalledProcessError: Command '[u'c:\\mozilla-build\\python\\Scripts\\hg.exe', '--config', 'extensions.bzexport=!', '--config', 'extensions.bzpost=!', '--config', 'extensions.firefoxtree=!', '--config', 'extensions.hgwatchman=!', '--config', 'extensions.mozext=!', '--config', 'extensions.mqext=!', '--config', 'extensions.qimportbz=!', '--config', 'extensions.push-to-try=!', '--config', 'extensions.reviewboard=!', 'update', '-r', '@']' returned non-zero exit status 255
> 
>   File "c:\mozilla\src\python/mozboot/mozboot/mach_commands.py", line 71, in mercurial_setup
>     bootstrap.update_vct(hg, self._context.state_dir)
>   File "c:\mozilla\src\python/mozboot\mozboot\bootstrap.py", line 387, in update_vct
>     vct_dir, '@')
>   File "c:\mozilla\src\python/mozboot\mozboot\bootstrap.py", line 444, in update_mercurial_repo
>     subprocess.check_call(update_args, cwd=dest)
>   File "c:\mozilla-build\python\lib\subprocess.py", line 186, in check_call
>     raise CalledProcessError(retcode, cmd)

And I still see the error. (Probably, I failed |./mach bootstrap| with this kind of error and that broke my environment -- it seemed that there were 2 Mercurial instances, one was in mozilla-build and the other was somewhere.)
Flags: needinfo?(masayuki)
Ah, okay updating version-control-tools is failing because it looks like you have modifications in the working directory conflicting with the update. Did you make changes to the repo at <home folder>/.mozbuild/version-control-tools ?

If you haven't made changes you should be able to fix the problem by going into that directory and running:
> c:\\mozilla-build\\python\\Scripts\\hg.exe --config extensions.bzexport=! --config extensions.bzpost=! --config extensions.firefoxtree=! --config extensions.hgwatchman=! --config extensions.mozext=! --config extensions.mqext=! --config extensions.qimportbz=! --config extensions.push-to-try=! --config extensions.reviewboard=! update --clean -r @

does this work for you?
Flags: needinfo?(masayuki)
Potential work-around (because not pushing your code is annoying :) :

You might be able to comment out this line: https://github.com/mozilla/version-control-tools/blob/71e07644cc46e7d6f46baa1e1b7727485425cf18/hgext/reviewboard/client.py#L428

In your .../.mozbuild/version-control-tools/hgext/reviewboard/client.py. I expect it'll get overwritten (or cause trouble!) the next time your version-control-tools is updated so perhaps you should revert after you push but I think it'll at least let you land your code.
(In reply to Steven MacLeod [:smacleod] from comment #3)
> Ah, okay updating version-control-tools is failing because it looks like you
> have modifications in the working directory conflicting with the update. Did
> you make changes to the repo at <home
> folder>/.mozbuild/version-control-tools ?
> 
> If you haven't made changes you should be able to fix the problem by going
> into that directory and running:
> > c:\\mozilla-build\\python\\Scripts\\hg.exe --config extensions.bzexport=! --config extensions.bzpost=! --config extensions.firefoxtree=! --config extensions.hgwatchman=! --config extensions.mozext=! --config extensions.mqext=! --config extensions.qimportbz=! --config extensions.push-to-try=! --config extensions.reviewboard=! update --clean -r @
> 
> does this work for you?

Thank you. The command didn't work fine first because my .hgrc has:

[defaults]
update = -c

(-c conflicted with --clean.)

However, after solving this issue, indeed, I become to do |hg push review| with stylecheck.

Thank you for your support!

(In reply to Michael Comella (:mcomella) from comment #4)
> Potential work-around (because not pushing your code is annoying :) :
> 
> You might be able to comment out this line:
> https://github.com/mozilla/version-control-tools/blob/
> 71e07644cc46e7d6f46baa1e1b7727485425cf18/hgext/reviewboard/client.py#L428
> 
> In your .../.mozbuild/version-control-tools/hgext/reviewboard/client.py. I
> expect it'll get overwritten (or cause trouble!) the next time your
> version-control-tools is updated so perhaps you should revert after you push
> but I think it'll at least let you land your code.

Thank you for your comment. As I said above, I succeeded to clean up my environment but it may be useful information when I (or others) meet similar problem.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(masayuki)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.