changeset 1368:4f8b1f202c90 stable

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().
author Laurent Charignon <lcharignon@fb.com>
date Thu, 07 Jan 2016 07:59:37 -0800
parents 388511fe46be
children e0e44fcd1b5a
files hgsubversion/wrappers.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()