changeset 4:aa0c2e9f5f59

Adapt to Mercurial API change
author Martin Geisler <mg@aragost.com>
date Wed, 24 Nov 2010 14:58:48 +0100
parents a2184bbf38e6
children 73658c424c7b
files onsub.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/onsub.py	Mon Sep 06 12:35:30 2010 +0200
+++ b/onsub.py	Wed Nov 24 14:58:48 2010 +0100
@@ -53,7 +53,13 @@
         else:
             sub = work.pop(0)
 
-        relpath = subrepo.relpath(sub)
+        # subrepo.relpath was renamed to subrepo.subrelpath in
+        # 18b5b6392fcf.
+        if hasattr(subrepo, 'relpath'):
+            relpath = subrepo.relpath(sub)
+        else:
+            relpath = subrepo.subrelpath(sub)
+
         if print0:
             ui.write(relpath, "\0")
         else: