diff --git a/hgext3rd/sparse.py b/hgext3rd/sparse.py --- a/hgext3rd/sparse.py +++ b/hgext3rd/sparse.py @@ -758,7 +758,7 @@ newexclude = set(oldexclude) newprofiles = set(oldprofiles) - if any(pat.startswith('/') for pat in pats): + if any(os.path.isabs(pat) for pat in pats): err = _('paths cannot start with /') hint = _('do not use absolute paths') raise error.Abort(err, hint=hint)