changeset 1123:37989fbbab5c

util: remove pre-1.6 mercurial code from parseurl
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 23 Aug 2013 13:08:58 -0500
parents cc2049298699
children 99c503cfcc9c
files hgsubversion/util.py
diffstat 1 files changed, 4 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -158,19 +158,10 @@ def pickle_atomic(data, file_path):
         f.close()
 
 def parseurl(url, heads=[]):
-    parsed = hg.parseurl(url, heads)
-    if len(parsed) == 3:
-        # old hg, remove when we can be 1.5-only
-        svn_url, heads, checkout = parsed
-    else:
-        svn_url, heads = parsed
-        if isinstance(heads, tuple) and len(heads) == 2:
-            # hg 1.6 or later
-            _junk, heads = heads
-        if heads:
-            checkout = heads[0]
-        else:
-            checkout = None
+    checkout = None
+    svn_url, (_junk, heads) = hg.parseurl(url, heads)
+    if heads:
+        checkout = heads[0]
     return svn_url, heads, checkout