ReleaseEngineering/TryServer: Difference between revisions

Line 40: Line 40:


=== hg phases ===
=== hg phases ===
[http://mercurial.selenic.com/wiki/Phases hg phases] were introduced in Mercurial 2.1.  Their purpose is to keep you from accidentally modifying changesets you've shared with others, or from accidentally sharing your patch queue with others.  In particular, this keeps you from pushing patches to try and from qpop'ing patches you've pushed to try!
[http://mercurial.selenic.com/wiki/Phases hg phases] were introduced in Mercurial 2.1.  Their purpose is to keep you from accidentally modifying changesets you've shared with others, or from accidentally sharing your patch queue with others.  In particular, this keeps you from qpop'ing patches you've pushed to try!


In order to get pushing to try to work, you'll need to add the following to your ~/.hgrc:
When you run <tt>hg qpop</tt> after pushing to try, you'll get
<pre>[mq]
secret = false</pre>
qpop and qpush your patch queue and you should be able to push again.
 
But now when you qpop (or qref) after pushing to try, you'll get


<pre>abort: popping would remove an immutable revision</pre>
<pre>abort: popping would remove an immutable revision</pre>
Line 54: Line 49:
<pre>hg phase -f --draft qparent:tip</pre>
<pre>hg phase -f --draft qparent:tip</pre>


These extra steps should no longer be necessary once the server is upgraded to Mercurial 2.1 and configured as "non-publishing" ({{bug|725362}}).
==== Disable hg phases with an extension ====
 
Alternatively, you can avoid this rigamarole by disabling hg phases with an extension. Create a file (e.g. /etc/mercurial/extensions/nophases.py) containing:


==== Utilizing an Extension ====
There is another way to do this that doesn't require quite as much work. You can use the following extension to disable this functionality. Save the following file where you keep extensions (I used /etc/mercurial/extensions/nophases.py):
<pre>
<pre>
from mercurial import phases
from mercurial import phases
Line 76: Line 71:


Now you should be able to perform hg push -f <whatever> without it affecting the phase.
Now you should be able to perform hg push -f <whatever> without it affecting the phase.
These extra steps should no longer be necessary once the server is upgraded to Mercurial 2.1 and configured as "non-publishing" ({{bug|725362}}).


=== Viewing the results ===
=== Viewing the results ===
187

edits