mercurial/sparse.py
changeset 33709 7dcb517122f9
parent 33556 22371eabb3b1
child 33711 e1c56486d1aa
--- a/mercurial/sparse.py	Thu Aug 03 23:02:32 2017 +0900
+++ b/mercurial/sparse.py	Wed Aug 02 15:05:21 2017 -0700
@@ -636,10 +636,10 @@
             newexclude = set(oldexclude)
             newprofiles = set(oldprofiles)
 
-        if any(pat.startswith('/') for pat in pats):
-            repo.ui.warn(_('warning: paths cannot start with /, ignoring: %s\n')
-                         % ([pat for pat in pats if pat.startswith('/')]))
-        elif include:
+        if any(os.path.isabs(pat) for pat in pats):
+            raise error.Abort(_('paths cannot be absolute'))
+
+        if include:
             newinclude.update(pats)
         elif exclude:
             newexclude.update(pats)