[PATCH] convert/cvs: improve error message on unexpected server output

Greg Ward greg-hg at gerg.ca
Wed Jul 8 21:14:49 CDT 2009


# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1247105325 14400
# Node ID 332293d2ff1ed16182307d41388c4a8cdbfa9190
# Parent  9f191931c8592711b02af4ceef9f84e056951843
convert/cvs: improve error message on unexpected server output.

diff --git a/hgext/convert/cvs.py b/hgext/convert/cvs.py
--- a/hgext/convert/cvs.py
+++ b/hgext/convert/cvs.py
@@ -282,7 +282,9 @@
         self.writep.flush()
         r = self.readp.readline()
         if not r.startswith("Valid-requests"):
-            raise util.Abort(_("server sucks"))
+            raise util.Abort(_("unexpected response from CVS server "
+                               "(expected \"Valid-requests\", but got %r)")
+                             % r)
         if "UseUnchanged" in r:
             self.writep.write("UseUnchanged\n")
             self.writep.flush()


More information about the Mercurial-devel mailing list