# HG changeset patch # User Matt Mackall # Date 1149440752 -3600 # Node ID fa4c11751367506265deb5b68fc76c10723a6884 # Parent 482d3fb47d80693f929101f95944bf019009dd79 Give a response to unknown SSH commands diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2476,13 +2476,13 @@ def serve(ui, repo, **opts): cmd = fin.readline()[:-1] if cmd == '': return - if cmd == "heads": + elif cmd == "heads": h = repo.heads() respond(" ".join(map(hex, h)) + "\n") - if cmd == "lock": + elif cmd == "lock": lock = repo.lock() respond("") - if cmd == "unlock": + elif cmd == "unlock": if lock: lock.release() lock = None @@ -2524,6 +2524,9 @@ def serve(ui, repo, **opts): r = repo.addchangegroup(fin, 'serve') respond(str(r)) + else: + respond("") + optlist = ("name templates style address port ipv6" " accesslog errorlog webdir_conf") for o in optlist.split():