# HG changeset patch # User Martin Geisler # Date 1290607128 -3600 # Node ID aa0c2e9f5f59c1a0eb12afd96ff86a165ec93f47 # Parent a2184bbf38e60306b4dc5ad825ad436370af01c8 Adapt to Mercurial API change diff -r a2184bbf38e6 -r aa0c2e9f5f59 onsub.py --- 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: