Patchwork [2,of,4,stable] largefiles status: update lfdirstate with result from cleanliness check

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 21, 2012, 6:56 p.m.
Message ID <876b1badac64c71672d7.1356116162@mk-desktop>
Download mbox | patch
Permalink /patch/246/
State Accepted
Commit 03faf12fbee7e25a37608f56c72e54e77fd66fcd
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 876b1badac64c71672d72da7082b3665e96e8ad1
# Parent  7ccb2671617299c81b9ed9f38e3debc7231ebfc4
largefiles status: update lfdirstate with result from cleanliness check

Problem: 'hg status' kept checking largefiles with an unknown state until some
other command wrote the updated dirstate.

Solution: Add missing lfdirstate.write().

Patch

diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -269,6 +269,8 @@ 
                         return f
                     result = [[toname(f) for f in items] for items in result]
 
+                lfdirstate.write()
+
                 if not listunknown:
                     result[4] = []
                 if not listignored:
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -44,8 +44,8 @@ 
   n 644          8 normal1
   n 644          8 sub/normal2
   $ hg debugstate --large
-  n   0         -1 large1
-  n   0         -1 sub/large2
+  n 644          7 large1
+  n 644          7 sub/large2
   $ echo normal11 > normal1
   $ echo normal22 > sub/normal2
   $ echo large11 > large1