Patchwork [STABLE] merge: fix spelling of length

login
register
mail settings
Submitter Olle Lundberg
Date Feb. 28, 2014, 1:33 a.m.
Message ID <c77e718c1c8a55c0222a.1393551239@se-c02kq0dadr55.lan>
Download mbox | patch
Permalink /patch/3803/
State Accepted
Headers show

Comments

Olle Lundberg - Feb. 28, 2014, 1:33 a.m.
# HG changeset patch
# User Olle Lundberg <geek@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
Matt Mackall - Feb. 28, 2014, 1:52 a.m.
On Fri, 2014-02-28 at 02:33 +0100, Olle Lundberg wrote:
> # HG changeset patch
> # User Olle Lundberg <geek@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

Queued for default, thanks.

Patch

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