Patchwork [3,of,4,stable] largefiles revert: update lfdirstate with result from first cleanliness check

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 21, 2012, 6:56 p.m.
Message ID <35c531de3fa7d96feca3.1356116163@mk-desktop>
Download mbox | patch
Permalink /patch/247/
State Accepted
Commit e388273f3ad175904e06cbe7edb0bd250c95b9ab
Headers show

Comments

Mads Kiilerich - Dec. 21, 2012, 6:56 p.m.
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1355422746 -3600
# Branch stable
# Node ID 35c531de3fa7d96feca31fcff87d55b40dd8b45f
# Parent  876b1badac64c71672d72da7082b3665e96e8ad1
largefiles revert: update lfdirstate with result from first cleanliness check

This will improve performance when running revert while working directory has
largefiles where content must be checked.

The issue could perhaps be resolved in more clever way by avoiding having two
lfdirstates and lfdirstatestatus invocations in one function...

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -572,6 +572,7 @@ 
         lfdirstate = lfutil.openlfdirstate(ui, repo)
         (modified, added, removed, missing, unknown, ignored, clean) = \
             lfutil.lfdirstatestatus(lfdirstate, repo, repo['.'].rev())
+        lfdirstate.write()
         for lfile in modified:
             lfutil.updatestandin(repo, lfutil.standin(lfile))
         for lfile in missing: