# HG changeset patch # User Augie Fackler # Date 1396661322 14400 # Node ID c55b94dc3a4831208b7b1888d1d6f2f1496480e6 # Parent 8be51900386839f205726bd9edefa5dc1c2fe610# Parent 61d4fb78370bc72160966fb4dc0685b5b90ae5e9 Merge with stable. diff --git a/hgsubversion/svnrepo.py b/hgsubversion/svnrepo.py --- a/hgsubversion/svnrepo.py +++ b/hgsubversion/svnrepo.py @@ -84,7 +84,12 @@ def generate_repo_class(ui, repo): class svnlocalrepo(superclass): def svn_commitctx(self, ctx): """Commits a ctx, but defeats manifest recycling introduced in hg 1.9.""" - hash = self.commitctx(ctxctx(ctx)) + ncbackup = self.ui.backupconfig('phases', 'new-commit') + try: + self.ui.setconfig('phases', 'new-commit', 'public') + hash = self.commitctx(ctxctx(ctx)) + finally: + self.ui.restoreconfig(ncbackup) if phases is not None and getattr(self, 'pushkey', False): # set phase to be public self.pushkey('phases', self[hash].hex(), str(phases.draft), str(phases.public)) diff --git a/tests/test_pull.py b/tests/test_pull.py --- a/tests/test_pull.py +++ b/tests/test_pull.py @@ -60,6 +60,13 @@ class TestPull(test_util.TestBase): commands.pull(repo.ui, repo) self.assertEqual(oldheads, map(node.hex, repo.heads())) + def test_pull_with_secret_default(self): + repo = self._loadupdate('branchtagcollision.svndump', + config={'phases.new-commit': 'secret'})[0] + oldheads = map(node.hex, repo.heads()) + commands.pull(repo.ui, repo) + self.assertEqual(oldheads, map(node.hex, repo.heads())) + def test_skip_basic(self): repo, repo_path = self._loadupdate('single_rev.svndump') self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'})