Patchwork [v2] debuglabelcomplete: fix to call debugnamecomplete in new location

login
register
mail settings
Submitter via Mercurial-devel
Date March 14, 2017, 8:27 p.m.
Message ID <71dc279eeafbfd9c61ae.1489523272@dragonair.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/19339/
State Accepted
Headers show

Comments

via Mercurial-devel - March 14, 2017, 8:27 p.m.
# HG changeset patch
# User Kyle Lippincott <spectral@google.com>
# Date 1489522230 25200
#      Tue Mar 14 13:10:30 2017 -0700
# Node ID 71dc279eeafbfd9c61aeeec7b8b81148c57d7f4e
# Parent  b6f5af372c0c047340e3c6bdd27b87207b9cec92
debuglabelcomplete: fix to call debugnamecomplete in new location

debugnamecomplete was moved in a9aa67ba from commands to debugcommands, but
debuglabelcomplete was not modified to call it in its new location.
via Mercurial-devel - March 14, 2017, 10:14 p.m.
On Tue, Mar 14, 2017 at 1:27 PM, Kyle Lippincott via Mercurial-devel
<mercurial-devel@mercurial-scm.org> wrote:
> # HG changeset patch
> # User Kyle Lippincott <spectral@google.com>
> # Date 1489522230 25200
> #      Tue Mar 14 13:10:30 2017 -0700
> # Node ID 71dc279eeafbfd9c61aeeec7b8b81148c57d7f4e
> # Parent  b6f5af372c0c047340e3c6bdd27b87207b9cec92
> debuglabelcomplete: fix to call debugnamecomplete in new location

Queued, thanks.

Patch

diff -r b6f5af372c0c -r 71dc279eeafb mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Sun Mar 12 15:27:02 2017 -0400
+++ b/mercurial/debugcommands.py	Tue Mar 14 13:10:30 2017 -0700
@@ -1127,7 +1127,7 @@ 
 @command('debuglabelcomplete', [], _('LABEL...'))
 def debuglabelcomplete(ui, repo, *args):
     '''backwards compatibility with old bash completion scripts (DEPRECATED)'''
-    commands.debugnamecomplete(ui, repo, *args)
+    debugnamecomplete(ui, repo, *args)
 
 @command('debuglocks',
          [('L', 'force-lock', None, _('free the store lock (DANGEROUS)')),
diff -r b6f5af372c0c -r 71dc279eeafb tests/test-completion.t
--- a/tests/test-completion.t	Sun Mar 12 15:27:02 2017 -0400
+++ b/tests/test-completion.t	Tue Mar 14 13:10:30 2017 -0700
@@ -358,3 +358,18 @@ 
   fee
   fie
   fo
+
+Test debuglabelcomplete, a deprecated name for debugnamecomplete that is still
+used for completions in some shells.
+
+  $ hg debuglabelcomplete
+  Fum
+  default
+  fee
+  fie
+  fo
+  tip
+  $ hg debuglabelcomplete f
+  fee
+  fie
+  fo