Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

shlib: simplify update_thgstatus a bit

this also marks directories with missing files as 'removed' status.

Changeset 458ac68f829d

Parent 28af0c485cf4

by Steve Borho

Changes to one file · Browse files at 458ac68f829d Showing diff from parent 28af0c485cf4 Diff from another changeset...

Change 1 of 2 Show Entire File thgutil/​shlib.py Stacked
 
210
211
212
213
 
214
215
216
 
218
219
220
221
 
222
223
 
224
225
226
 
210
211
212
 
213
214
215
216
 
218
219
220
 
221
222
 
223
224
225
226
@@ -210,7 +210,7 @@
  time.sleep(tdelta)   repo = hg.repository(ui, root) # a fresh repo object is needed   repostate = repo.status() # will update .hg/dirstate as a side effect - modified, added, removed, deleted, unknown, ignored, clean = repostate + modified, added, removed, deleted = repostate[:4]   dirstatus = {}   def dirname(f):   return '/'.join(f.split('/')[:-1]) @@ -218,9 +218,9 @@
  dirstatus[dirname(fn)] = 'a'   for fn in modified:   dirstatus[dirname(fn)] = 'm' - for fn in removed: + for fn in removed + deleted:   dirstatus[dirname(fn)] = 'r' - f = open(repo.root + "\\.hg\\thgstatus", 'wb') + f = open(repo.join("thgstatus"), 'wb')   for dn in sorted(dirstatus):   f.write(dirstatus[dn] + dn + '\n')   f.close()