Kiln » largefiles » Unity
Clone URL:  

largefiles: rip out dirstate normaldirty: the state it signals no longer exists

The normaldirty dirstate status was used in bfiles to signal that a largefile
had been modified but not bfrefreshed. Since kbfiles removed bfrefresh and
tied updating the standin to updating the bfile, a bfile modified is simply
'Modified', so this status no longer holds any meaning, so replace code that
sets it with either noops or setting state 'normallookup' instead.

Changeset 65a0bfb13411

Parent 9e5f67217e8e

by Profile picture of User 521Andrew Pritchard <andrewp@fogcreek.com>

Changes to 2 files · Browse files at 65a0bfb13411 Showing diff from parent 9e5f67217e8e Diff from another changeset...

Change 1 of 1 Show Entire File lfcommands.py Stacked
 
411
412
413
414
415
416
417
418
 
411
412
413
 
 
414
415
416
@@ -411,8 +411,6 @@
  lfdirstate.add(lfile)   elif expectedhash == lfutil.readstandin(repo, lfile, '.'):   lfdirstate.normal(lfile) - else: - lfutil.dirstate_normaldirty(lfdirstate, lfile)     removed = 0   for lfile in lfdirstate:
Change 1 of 2 Show Entire File lfutil.py Stacked
 
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 
206
207
208
209
 
210
211
212
213
214
215
216
 
217
218
219
 
83
84
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
87
88
 
190
191
192
 
193
194
195
196
197
198
199
 
200
201
202
203
@@ -83,22 +83,6 @@
  forget = repo[None].forget   return forget(list)   -def dirstate_normaldirty(dirstate, file): - try: - normaldirty = dirstate.normaldirty - except AttributeError: - # Mercurial >= 1.6: HAAAACK: I should not be using normaldirty() - # (now called otherparent()), and dirstate in 1.6 prevents me - # from doing so. So reimplement it here until I figure out the - # right fix. - def normaldirty(f): - dirstate._dirty = True - dirstate._addpath(f) - dirstate._map[f] = ('n', 0, -2, -1) - if f in dirstate._copymap: - del dirstate._copymap[f] - normaldirty(unixpath(file)) -  def findoutgoing(repo, remote, force):   # First attempt is for Mercurial <= 1.5 second is for >= 1.6   try: @@ -206,14 +190,14 @@
  curhash = hashfile(bigfile)   except IOError, err:   if err.errno == errno.ENOENT: - dirstate_normaldirty(lfdirstate, bigfile) + lfdirstate.normallookup(bigfile)   else:   raise   else:   if curhash == hash:   lfdirstate.normal(unixpath(bigfile))   else: - dirstate_normaldirty(lfdirstate, bigfile) + lfdirstate.normallookup(bigfile)     lfdirstate.write()