From patchwork Wed Nov 25 01:19:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3, of, 4] parsers: indentation change to make the next patch more legible From: Laurent Charignon X-Patchwork-Id: 11643 Message-Id: <5c7759228e340435b6b3.1448414350@dev5073.prn1.facebook.com> To: Date: Tue, 24 Nov 2015 17:19:10 -0800 # HG changeset patch # User Laurent Charignon # Date 1448411871 28800 # Tue Nov 24 16:37:51 2015 -0800 # Node ID 5c7759228e340435b6b391aa080342f97e548821 # Parent ea9d03d4e85ea3949bb8d16bd9e1a80246a8247b parsers: indentation change to make the next patch more legible The next patch changes indentation and to make it easier to review, this patch contains only the indentation change. diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -88,23 +88,24 @@ cs = cStringIO.StringIO() write = cs.write write("".join(pl)) - for f, e in dmap.iteritems(): - if e[0] == 'n' and e[3] == now: - # The file was last modified "simultaneously" with the current - # write to dirstate (i.e. within the same second for file- - # systems with a granularity of 1 sec). This commonly happens - # for at least a couple of files on 'update'. - # The user could change the file without changing its size - # within the same second. Invalidate the file's mtime in - # dirstate, forcing future 'status' calls to compare the - # contents of the file if the size is the same. This prevents - # mistakenly treating such files as clean. - e = dirstatetuple(e[0], e[1], e[2], -1) - dmap[f] = e + if True: + for f, e in dmap.iteritems(): + if e[0] == 'n' and e[3] == now: + # The file was last modified "simultaneously" with the current + # write to dirstate (i.e. within the same second for file- + # systems with a granularity of 1 sec). This commonly happens + # for at least a couple of files on 'update'. + # The user could change the file without changing its size + # within the same second. Invalidate the file's mtime in + # dirstate, forcing future 'status' calls to compare the + # contents of the file if the size is the same. This prevents + # mistakenly treating such files as clean. + e = dirstatetuple(e[0], e[1], e[2], -1) + dmap[f] = e - if f in copymap: - f = "%s\0%s" % (f, copymap[f]) - e = _pack(">cllll", e[0], e[1], e[2], e[3], len(f)) - write(e) - write(f) + if f in copymap: + f = "%s\0%s" % (f, copymap[f]) + e = _pack(">cllll", e[0], e[1], e[2], e[3], len(f)) + write(e) + write(f) return cs.getvalue()