[PATCH 2 of 4 random] dirstate: clarify comment about leaving normal files undef if changed 'now'

Mads Kiilerich mads at kiilerich.com
Fri Feb 27 14:45:16 CST 2015


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1421194526 -3600
#      Wed Jan 14 01:15:26 2015 +0100
# Node ID abc351ec02d3c6d14cf9651cab970c31b45ecb29
# Parent  1bb2e55f98580e20b6d5b95c4f3ba41d213b74cd
dirstate: clarify comment about leaving normal files undef if changed 'now'

Clarify that they only are saved as undef if they were marked as normal and
changed in the same second.

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -882,9 +882,9 @@ class dirstate(object):
                 elif time != mtime and time != mtime & _rangemask:
                     ladd(fn)
                 elif mtime == lastnormaltime:
-                    # fn may have been changed in the same timeslot without
-                    # changing its size. This can happen if we quickly do
-                    # multiple commits in a single transaction.
+                    # fn may just have been marked as normal and it may have
+                    # changed in the same second without changing its size.
+                    # This can happen if we quickly do multiple commits.
                     # Force lookup, so we don't miss such a racy file change.
                     ladd(fn)
                 elif listclean:


More information about the Mercurial-devel mailing list