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

login
register
mail settings
Submitter Mads Kiilerich
Date Feb. 27, 2015, 8:45 p.m.
Message ID <abc351ec02d3c6d14cf9.1425069916@madski>
Download mbox | patch
Permalink /patch/7851/
State Accepted
Commit 5245caa0dcde940ce11d2356aa01f446f08659c8
Headers show

Comments

Mads Kiilerich - Feb. 27, 2015, 8:45 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@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.

Patch

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: