git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 RESEND 1/2] git-p4: remove "debug" verb

From
Joel Holdsworth <jholdsworth@nvidia.com>
Date
Jan 4, 2022, 12:34 UTC
Message-ID
<20220104123431.1710-2-jholdsworth@nvidia.com>
In-Reply-To
<20220104123431.1710-1-jholdsworth@nvidia.com>

The git-p4 "debug" verb is described as "A tool to debug the output of p4 -G".

The verb is not documented in any detail, but implements a function which executes an arbitrary p4 command with the -G flag, which causes perforce to format all output as marshalled Python dictionary objects.

The verb was implemented early in the history of git-p4, and may once have served a useful purpose to the authors in the early stages of development. However, the "debug" verb is no longer being used by the current developers (and users) of git-p4, and whatever purpose the verb previously offered is easily replaced by invoking p4 directly.

This patch therefore removes the verb from git-p4.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
---
 git-p4.py | 16 ----------------
 1 file changed, 16 deletions(-)
diff --git a/git-p4.py b/git-p4.py
index 2b4500226a..b7ed8e41ff 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1532,21 +1532,6 @@ def loadUserMapFromCache(self):
         except IOError:
             self.getUserMapFromPerforceServer()
 
-class P4Debug(Command):
-    def __init__(self):
-        Command.__init__(self)
-        self.options = []
-        self.description = "A tool to debug the output of p4 -G."
-        self.needsGit = False
-
-    def run(self, args):
-        j = 0
-        for output in p4CmdList(args):
-            print('Element: %d' % j)
-            j += 1
-            print(output)
-        return True
-
 class P4RollBack(Command):
     def __init__(self):
         Command.__init__(self)
@@ -4363,7 +4348,6 @@ def printUsage(commands):
     print("")
 
 commands = {
-    "debug" : P4Debug,
     "submit" : P4Submit,
     "commit" : P4Submit,
     "sync" : P4Sync,
-- 
2.34.1
Previous: Joel HoldsworthNext: Joel Holdsworth
Message 2 of 4 in “git-p4: remove "debug" and "rollback" verbs”
  1. 0/2 git-p4: remove "debug" and "rollback" verbsJoel Holdsworth, Jan 4, 2022
  2. 1/2 git-p4: remove "debug" verbJoel Holdsworth, Jan 4, 2022
  3. 2/2 git-p4: remove "rollback" verbJoel Holdsworth, Jan 4, 2022
  4. Andrew OakleyJan 4, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.