git-p4: remove "debug" verb

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Joel Holdsworth committed Dec 22, 2021 at 14:55 UTC fb8dfc1ccbc60ea26c63f01071c6809c89d907e5
1 file changed -16
git-p4.py
-16
@@ -1532,21 +1532,6 @@ class P4UserMap:
1532 except IOError:
1533 self.getUserMapFromPerforceServer()
1534
1535 -class P4Debug(Command):
1536 - def __init__(self):
1537 - Command.__init__(self)
1538 - self.options = []
1539 - self.description = "A tool to debug the output of p4 -G."
1540 - self.needsGit = False
1541 -
1542 - def run(self, args):
1543 - j = 0
1544 - for output in p4CmdList(args):
1545 - print('Element: %d' % j)
1546 - j += 1
1547 - print(output)
1548 - return True
1549 -
1535 class P4RollBack(Command):
1536 def __init__(self):
1537 Command.__init__(self)
@@ -4363,7 +4348,6 @@ def printUsage(commands):
4348 print("")
4349
4350 commands = {
4366 - "debug" : P4Debug,
4351 "submit" : P4Submit,
4352 "commit" : P4Submit,
4353 "sync" : P4Sync,