# HG changeset patch # User Laurent Charignon # Date 1452182377 28800 # Node ID 4f8b1f202c902606837513071e78125fc7a5eba1 # Parent 388511fe46be95f37cc209812c09d9f661aaeb8e compat: fix use of repo.parents() to repo[None].parents() While using hgsubversion with the latest tip of core mercurial I saw this warning: (compatibility will be dropped after Mercurial-3.7, update your code.) at: /usr/lib/python2.6/site-packages/hgsubversion/wrappers.py:219 (push) searching for changes This patch fixes the issue and replaced the use of repo.parents() by repo[None].parents(). diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -215,7 +215,7 @@ def push(repo, dest, force, revs): if len(repo.parents()) != 1: ui.status('Cowardly refusing to push branch merge\n') return 0 # results in nonzero exit status, see hg's commands.py - workingrev = repo.parents()[0] + workingrev = repo[None].parents()[0] workingbranch = workingrev.branch() ui.status('searching for changes\n') hashes = meta.revmap.hashes()