changeset 430:7a04853e2587

outgoing: abort on broken hg versions rather than printing wrong results
author Augie Fackler <durin42@gmail.com>
date Fri, 09 Sep 2011 16:08:31 -0500
parents 6674c0d42d68
children 83f248dd0eb9
files hggit/__init__.py tests/test-outgoing
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/__init__.py	Fri Sep 09 16:00:52 2011 -0500
+++ b/hggit/__init__.py	Fri Sep 09 16:08:31 2011 -0500
@@ -130,6 +130,10 @@
         kwname = 'onlyheads'
     def findoutgoing(orig, local, remote, *args, **kwargs):
         if isinstance(remote, gitrepo.gitrepo):
+            hgver = hg.util.version()
+            if hgver >= '1.8.9' or (hgver > '1.8' and '+' in hgver):
+                raise hgutil.Abort(
+                    'hg-git outgoing support is broken on hg 1.9.x')
             # clean up this cruft when we're 1.7-only, remoteheads and
             # the return value change happened between 1.6 and 1.7.
             kw = {}
--- a/tests/test-outgoing	Fri Sep 09 16:00:52 2011 -0500
+++ b/tests/test-outgoing	Fri Sep 09 16:08:31 2011 -0500
@@ -2,6 +2,7 @@
 
 # Fails for some reason, need to investigate
 # "$TESTDIR/hghave" git || exit 80
+python -c 'from mercurial import util ; assert util.version() < "1.8"' || exit 80
 
 # bail if the user does not have dulwich
 python -c 'import dulwich, dulwich.repo' || exit 80