Mercurial > public > mercurial-scm > hg-stable
diff hgext/sparse.py @ 41988:f9344d04909e
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
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Mon, 18 Mar 2019 14:48:49 +0300 |
parents | 0531dff73d0b |
children | 87a34c767384 |
line wrap: on
line diff
--- 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,