Mercurial > hg > evolve
changeset 1283:253293df84a6
merge with stable
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sun, 14 Dec 2014 12:14:45 -0800 |
parents | ad7a31a7a413 (current diff) 0b66826f081c (diff) |
children | 0c879e986ce4 |
files | hgext/evolve.py tests/test-obsconvert.t tests/test-simple4server-bundle2.t |
diffstat | 20 files changed, 25 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/README +++ b/README @@ -28,6 +28,9 @@ Contribute ========== +Bugs are to be reported on the mercurial's bug tracker: http://bz.selenic.com/ +Use the the "evolution" component. + Please use the patchbomb extension to send email to mercurial devel. Please make sure to use the evolve-ext flag when doing so. You can use a command like this: @@ -48,6 +51,10 @@ Changelog ========= +5.0.2 -- + +- evolve: remove dependency to the rebase extension + 5.0.1 -- 2014-11-25 - amend: fix --logfile argument
--- a/docs/sharing.rst +++ b/docs/sharing.rst @@ -89,12 +89,10 @@ $ cat >> test-repo/.hg/hgrc <<EOF [extensions] - rebase = evolve = /path/to/mutable-history/hgext/evolve.py EOF $ cat >> dev-repo/.hg/hgrc <<EOF [extensions] - rebase = evolve = /path/to/mutable-history/hgext/evolve.py EOF @@ -276,7 +274,6 @@ [phases] publish = false [extensions] - rebase = evolve = /path/to/mutable-history/hgext/evolve.py EOF $ cp alice/.hg/hgrc bob/.hg/hgrc
--- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -768,8 +768,6 @@ "manually with nothing to rebase - working " "directory parent is also destination")) - rebase = extensions.find('rebase') - # dummy state to trick rebase node if not orig.p2().rev() == node.nullrev: raise util.Abort( 'no support for evolving merge changesets yet', @@ -806,21 +804,27 @@ tr = repo.transaction('relocate') try: try: - r = rebase.rebasenode(repo, orig.node(), dest.node(), - {node.nullrev: node.nullrev}, False, - orig.p1().node()) - if r[-1]: #some conflict + if repo['.'].rev() != dest.rev(): + merge.update(repo, dest, False, True, False) + if keepbranch: + repo.dirstate.setbranch(orig.branch()) + r = merge.graft(repo, orig, orig.p1(), ['local', 'graft']) + if r[-1]: #some conflict raise util.Abort( 'unresolved merge conflicts (see hg help resolve)') - if keepbranch: - def _extrafn(ctx, extra): - extra['branch'] = ctx.branch() - else: - _extrafn = (lambda ctx, extra: None) + if commitmsg is None: + commitmsg = orig.description() + extra = {'rebase_source': orig.hex()} - nodenew = rebase.concludenode(repo, orig.node(), dest.node(), - node.nullid, commitmsg, - extrafn=_extrafn) + backup = repo.ui.backupconfig('phases', 'new-commit') + try: + targetphase = max(orig.phase(), phases.draft) + repo.ui.setconfig('phases', 'new-commit', targetphase, 'rebase') + # Commit might fail if unresolved files exist + nodenew = repo.commit(text=commitmsg, user=orig.user(), + date=orig.date(), extra=extra) + finally: + repo.ui.restoreconfig(backup) except util.Abort, exc: repo.dirstate.beginparentchange() repo.setparents(repo['.'].node(), nullid) @@ -2247,11 +2251,6 @@ @eh.extsetup def oldevolveextsetup(ui): - try: - rebase = extensions.find('rebase') - except KeyError: - raise error.Abort(_('evolution extension requires rebase extension.')) - for cmd in ['kill', 'uncommit', 'touch', 'fold']: entry = extensions.wrapcommand(cmdtable, cmd, warnobserrors)
--- a/tests/_exc-util.sh +++ b/tests/_exc-util.sh @@ -20,7 +20,6 @@ [extensions] hgext.strip= -hgext.rebase= EOF echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-amend.t +++ b/tests/test-amend.t @@ -1,6 +1,5 @@ $ cat >> $HGRCPATH <<EOF > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-corrupt.t +++ b/tests/test-corrupt.t @@ -13,7 +13,6 @@ > git = 1 > unified = 0 > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-drop.t +++ b/tests/test-drop.t @@ -1,7 +1,6 @@ $ cat >> $HGRCPATH <<EOF > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "drophack=$(echo $(dirname $TESTDIR))/hgext/drophack.py" >> $HGRCPATH
--- a/tests/test-evolve-bumped.t +++ b/tests/test-evolve-bumped.t @@ -10,7 +10,6 @@ $ cd private $ cat >> .hg/hgrc <<EOF > [extensions] - > rebase = > evolve = $evolvepath > [phases] > publish = false
--- a/tests/test-evolve.t +++ b/tests/test-evolve.t @@ -13,7 +13,6 @@ > git = 1 > unified = 0 > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-import.t +++ b/tests/test-import.t @@ -9,7 +9,6 @@ $ hg init auto-obsolete $ cd auto-obsolete $ echo '[extensions]' >> $HGRCPATH - $ echo 'rebase=' >> $HGRCPATH $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH $ echo A > a $ hg commit -Am A
--- a/tests/test-obsconvert.t +++ b/tests/test-obsconvert.t @@ -1,6 +1,5 @@ $ cat >> $HGRCPATH <<EOF > [extensions] - > rebase= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH $ hg init alpha
--- a/tests/test-obsolete-push.t +++ b/tests/test-obsolete-push.t @@ -2,7 +2,6 @@ > [defaults] > amend=-d "0 0" > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-prev-next.t +++ b/tests/test-prev-next.t @@ -1,6 +1,5 @@ $ cat >> $HGRCPATH <<EOF > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-prune.t +++ b/tests/test-prune.t @@ -2,7 +2,6 @@ > [ui] > logtemplate={rev}:{node|short}[{bookmarks}] ({obsolete}/{phase}) {desc|firstline}\n > [extensions] - > hgext.rebase= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-simple4server-bundle2.t +++ b/tests/test-simple4server-bundle2.t @@ -7,8 +7,6 @@ > allow_push = * > [phases] > publish = False - > [extensions] - > hgext.rebase= > [experimental] > bundle2-exp=True > EOF
--- a/tests/test-simple4server.t +++ b/tests/test-simple4server.t @@ -8,7 +8,6 @@ > [phases] > publish = False > [extensions] - > hgext.rebase= > EOF $ mkcommit() {
--- a/tests/test-stabilize-conflict.t +++ b/tests/test-stabilize-conflict.t @@ -16,7 +16,6 @@ > touch.gui=true > touch.args=babar > [extensions] - > hgext.rebase= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
--- a/tests/test-stabilize-order.t +++ b/tests/test-stabilize-order.t @@ -2,7 +2,6 @@ > [defaults] > amend=-d "0 0" > [extensions] - > hgext.rebase= > hgext.graphlog= > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH