Patchwork D6149: debugsparse: abort if the repository is not sparse instead of ui.status()

login
register
mail settings
Submitter phabricator
Date March 20, 2019, 6:07 p.m.
Message ID <8a2679e7b4c6016387bf53660fb3398d@localhost.localdomain>
Download mbox | patch
Permalink /patch/39342/
State Not Applicable
Headers show

Comments

phabricator - March 20, 2019, 6:07 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf9344d04909e: debugsparse: abort if the repository is not sparse instead of ui.status() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6149?vs=14544&id=14568

REVISION DETAIL
  https://phab.mercurial-scm.org/D6149

AFFECTED FILES
  hgext/sparse.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -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,