Closed
Bug 1484838
Opened 7 years ago
Closed 7 years ago
moz-phab submit does not restore the previous tree state when it encounters an error
Categories
(Conduit :: moz-phab, defect)
Conduit
moz-phab
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mstange, Unassigned)
References
Details
Steps to reproduce:
1. Use moz-phab for the first time without being authenticated in arc.
2. Have five local changesets applied in your tree.
3. Execute "moz-phab submit .^^ ."
It updates to changeset .^^ and fails with an error. After that, the working directory is now still at that changeset instead of being restored to the original changeset, and executing the same command again will attempt to submit a different range of revisions.
Log:
> $ moz-phab submit .^^ .
> Your version of Python does not validate HTTPS certificates. Please consider upgrading to Python 2.7.9 or later.
> Upgrading libphutil...
> Upgrading arcanist...
> Updated! Your copy of arc is now up to date.
> Submitting 3 commits:
> 503948:3abc713660b1 Bug 1484828 - Don't skip libraries with non-zero offsets. r=jld
> 503947:f9733172ad9a Bug 1484828 - Rename some fields in EHABIStackWalk.cpp. r=jld
> 503946:160c44ea3091 Bug 1484828 - Set SharedLibrary::mOffset to firstMappingStart - baseAddress. r=glandium
> 160c44ea3091 is based off non-public commit 9d46a8c56383
> Warning: found 93 untracked files:
> Submit to Phabricator (YES/No/Always)? YES
>
> Creating new revision:
> 503946:160c44ea3091 Bug 1484828 - Set SharedLibrary::mOffset to firstMappingStart - baseAddress. r=glandium
> Usage Exception: YOU NEED TO AUTHENTICATE TO CONTINUE
>
> You are trying to connect to a server (phabricator.services.mozilla.com) that you do not have any credentials stored for.
>
> To retrieve and store credentials for this server, run this command:
>
> $ arc install-certificate
>
> Exception: command 'arc' failed to complete successfully
> Markuss-MacBook-Pro:mozilla mstange$ arc install-certificate
> CONNECT Connecting to "https://phabricator.services.mozilla.com/api/"...
> LOGIN TO PHABRICATOR
> Open this page in your browser and login to Phabricator if necessary:
>
> https://phabricator.services.mozilla.com/conduit/login/
>
> Then paste the API Token on that page below.
>
> Paste API Token from that page: [redacted]
> Writing ~/.arcrc...
> SUCCESS! API Token installed.
> Markuss-MacBook-Pro:mozilla mstange$ moz-phab submit .^^ .
> Your version of Python does not validate HTTPS certificates. Please consider upgrading to Python 2.7.9 or later.
> Submitting 3 commits:
> 503946:160c44ea3091 Bug 1484828 - Set SharedLibrary::mOffset to firstMappingStart - baseAddress. r=glandium
> 503938:9d46a8c56383 Bug 1457481 - Stop demangling in the geckoProfiler WebExtension API because perf.html knows how to demangle now.
> 503937:0090dc7814c8 Bug 1457481 - Hook up the new devtools performance panel to nsIProfiler.getSymbolTable.
not restoring the tree back to its original state is currently "by design", so this is working as expected.
the reason for not restoring the tree is the script performs at times a surprising amount of changes to your repo in order to update its state (pro-tip: if you don't have evolve installed, you should install it). attempting to restore the repository when we're already in a failure state can potentially lead to making it worse and dataloss. this may change as the script matures and the failure states become well known.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Comment 3•7 years ago
|
||
Note that the situation will likely be at least somewhat improved by bug 1504965.
Comment 4•7 years ago
|
||
One situation I've just experienced and took me forever to identify.
Following the error in bug 1508953 and after restoring to a previous tree thanks to git reflog, I could no longer push my current stack.
I would always get the error:
$ ../moz-phab submit f48b19c3d1a727ec1710479a0790ea4ce54c7d24~5 f48b19c3d1a727ec1710479a0790ea4ce54c7d24
Multiple children found for commit c7443e57a24f, unable to continue. c7443e57a24f was my first patch.
it turned out that it had created a lone child commit on that one.
So I could push P2 to P5, but not P1.
Comment 5•7 years ago
|
||
Bug 1504965 landed today. It'll be released soon and should generally avoid this kind of problem.
You need to log in
before you can comment on or make changes to this bug.
Description
•