diff --git a/hgext3rd/pushrebase.py b/hgext3rd/pushrebase.py --- a/hgext3rd/pushrebase.py +++ b/hgext3rd/pushrebase.py @@ -147,6 +147,16 @@ repo.ui.setconfig('hooks', 'prechangegroup.blocknonpushrebase', blocknonpushrebase) + # https://www.mercurial-scm.org/repo/hg/rev/a1e70c1dbec0 + # and related commits added a new way to pushing bookmarks + # Since pushrebase for now uses pushkey, we want to set this config + # (T24314128 tracks this) + legexc = repo.ui.configlist('devel', 'legacy.exchange', []) + if 'bookmarks' not in legexc: + legexc.append('bookmarks') + repo.ui.setconfig('devel', 'legacy.exchange', + ','.join(legexc), 'pushrebase') + def blocknonpushrebase(ui, repo, **kwargs): if not repo.ui.configbool('pushrebase', pushrebasemarker): raise error.Abort(_("this repository requires that you enable the " diff --git a/tests/test-pushrebase-remotenames.t b/tests/test-pushrebase-remotenames.t --- a/tests/test-pushrebase-remotenames.t +++ b/tests/test-pushrebase-remotenames.t @@ -34,7 +34,6 @@ $ hg clone --config 'extensions.remotenames=' ssh://user@dummy/server client -q Test that pushing to a remotename gets rebased - $ cd server $ hg up -q master $ echo x >> a && hg commit -m "master's commit"