[PATCH STABLE] merge: fix spelling of length

Olle Lundberg olle.lundberg at gmail.com
Thu Feb 27 19:33:59 CST 2014


# HG changeset patch
# User Olle Lundberg <geek at nerd.sh>
# Date 1393550892 -3600
#      Fri Feb 28 02:28:12 2014 +0100
# Branch stable
# Node ID c77e718c1c8a55c0222a929d93dc7741c63e9553
# Parent  ba619c50a355c3946cdb07add520ff260034549d
merge: fix spelling of length

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -32,11 +32,11 @@
     Current new format is a list of arbitrary record of the form:
 
         [type][length][content]
 
     Type is a single character, length is a 4 bytes integer, content is an
-    arbitrary suites of bytes of lenght `length`.
+    arbitrary suites of bytes of length `length`.
 
     Type should be a letter. Capital letter are mandatory record, Mercurial
     should abort if they are unknown. lower case record can be safely ignored.
 
     Currently known record:
@@ -123,14 +123,14 @@
             off = 0
             end = len(data)
             while off < end:
                 rtype = data[off]
                 off += 1
-                lenght = _unpack('>I', data[off:(off + 4)])[0]
+                length = _unpack('>I', data[off:(off + 4)])[0]
                 off += 4
-                record = data[off:(off + lenght)]
-                off += lenght
+                record = data[off:(off + length)]
+                off += length
                 records.append((rtype, record))
             f.close()
         except IOError, err:
             if err.errno != errno.ENOENT:
                 raise


More information about the Mercurial-devel mailing list