[PATCH stable] convert.cvs: Initialize state variable
Mads Kiilerich
mads at kiilerich.com
Tue Mar 23 19:54:52 CDT 2010
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1269392066 -3600
# Branch stable
# Node ID e8230de3efb4a8b834b93c01c60785f9f55987a9
# Parent f621cddc06594a5c4e67ae910fd1ed9682a571a4
convert.cvs: Initialize state variable
Avoids
UnboundLocalError: local variable 'mode' referenced before assignment
when cvs fails
diff --git a/hgext/convert/cvs.py b/hgext/convert/cvs.py
--- a/hgext/convert/cvs.py
+++ b/hgext/convert/cvs.py
@@ -227,6 +227,7 @@
self.writep.flush()
data = ""
+ mode = ""
while 1:
line = self.readp.readline()
if line.startswith("Created ") or line.startswith("Updated "):
More information about the Mercurial-devel
mailing list