[Bug 3493] New: dirstate is cleared unnecessarily after "hg update"

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Fri Jun 8 07:32:46 CDT 2012


http://bz.selenic.com/show_bug.cgi?id=3493

          Priority: normal
            Bug ID: 3493
                CC: mercurial-devel at selenic.com, platings at ccdc.cam.ac.uk
          Assignee: bugzilla at selenic.com
           Summary: dirstate is cleared unnecessarily after "hg update"
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: martin at geisler.net
          Hardware: All
            Status: UNCONFIRMED
           Version: 2.2.1
         Component: eol
           Product: Mercurial

When "hg update" runs, the .hgeol file is loaded from the target revision in
the preupdate hook installed. The files are thus written in the working using
the correct line endings.

But a subsequent "hg status" will detect that the .hgeol file has been modified
and trigger a call to _hgcleardirstate. This means that Mercurial will re-check
all files on disk — this can be very slow if you have many files.

Testing on OpenOffice shows that

  touch .hgeol

makes "hg status" go from 0.6 sec to 16 sec. The same is seen with

  hg update null
  hg update tip
  hg status

This also affects the initial checkout done as part of "hg clone".

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list