Closed
Bug 1270346
Opened 9 years ago
Closed 7 years ago
"hg push review" should work even if there are uncommit changes
Categories
(MozReview Graveyard :: Integration: Mercurial, defect)
MozReview Graveyard
Integration: Mercurial
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: xidorn, Unassigned)
Details
If I run
> hg push -r xxx..xxx review
when I have uncommit changes, it reports:
> pushing to ssh://reviewboard-hg.mozilla.org/gecko
> abort: uncommitted changes
But I don't understand why pushing requires a clean working directory? It seems to me normal push doesn't require that, and pushing to MozReview shouldn't have the requirement either.
Comment 1•9 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #0)
> If I run
> > hg push -r xxx..xxx review
> when I have uncommit changes, it reports:
> > pushing to ssh://reviewboard-hg.mozilla.org/gecko
> > abort: uncommitted changes
>
> But I don't understand why pushing requires a clean working directory? It
> seems to me normal push doesn't require that, and pushing to MozReview
> shouldn't have the requirement either.
We need to rewrite the commit message of the commits you're pushing for review to include the MozReview-Commit-ID, which requires a clean working directory. The shelve extension[1] makes cleaning the working directory and restoring it quite simple.
[1] https://www.mercurial-scm.org/wiki/ShelveExtension
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Comment 2•9 years ago
|
||
Steven's explanation is correct.
However, we can leave this open to integrate shelve into the extension so things "just work."
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
| Reporter | ||
Comment 3•9 years ago
|
||
But all my commits already have MozReview-ID when they are created. It should also be able to detect this and skip rewriting if all commits being pushed have that.
| Reporter | ||
Comment 4•9 years ago
|
||
In addition, doing unconditionally shelve may trigger large range of recompile due to file update on headers.
I'd also hope mercurial has a mechanism to automatically restore the mtime somehow... which would be helpful for rebase and histedit as well.
Comment 5•7 years ago
|
||
MozReview is now obsolete. Please use Phabricator instead. Closing this bug.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•