# HG changeset patch # User Pulkit Goyal # Date 1552909729 -10800 # Node ID f9344d04909e53654e81a0aa151633ddb1dfd3c5 # Parent c1d83d916e8595a69e86bfed02e5a8ebb375901d debugsparse: abort if the repository is not sparse instead of ui.status() This is similar to what narrow extension does. Differential Revision: https://phab.mercurial-scm.org/D6149 diff -r c1d83d916e85 -r f9344d04909e hgext/sparse.py --- a/hgext/sparse.py Tue Mar 12 14:17:41 2019 -0700 +++ b/hgext/sparse.py Mon Mar 18 14:48:49 2019 +0300 @@ -318,9 +318,10 @@ if temporaryincludes: ui.status(_("Temporarily Included Files (for merge/rebase):\n")) ui.status(("\n".join(temporaryincludes) + "\n")) + return else: - ui.status(_('repo is not sparse\n')) - return + raise error.Abort(_('the debugsparse command is only supported on' + ' sparse repositories')) if include or exclude or delete or reset or enableprofile or disableprofile: sparse.updateconfig(repo, pats, opts, include=include, exclude=exclude,