Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master-1, master-0, and 0.9.4

Merge trunk.

Changeset 00a06b72e5c6

Parents 7695e5040ca0

Parents e6e18f37df84

by Jelmer Vernooij

Changes to 2 files · Browse files at 00a06b72e5c6 Showing diff from parent 7695e5040ca0 e6e18f37df84 Diff from another changeset...

Change 1 of 1 Show Entire File dulwich/​index.py Stacked
 
372
373
374
375
 
376
377
378
379
380
381
 
 
382
383
 
384
 
372
373
374
 
375
376
377
378
379
380
381
382
383
384
 
385
386
@@ -372,13 +372,15 @@
  yield ((None, name), (None, other_mode), (None, other_sha))     -def index_entry_from_stat(stat_val, hex_sha, flags): +def index_entry_from_stat(stat_val, hex_sha, flags, mode=None):   """Create a new index entry from a stat value.     :param stat_val: POSIX stat_result instance   :param hex_sha: Hex sha of the object   :param flags: Index flags   """ + if mode is None: + mode = stat_val.st_mode   return (stat_val.st_ctime, stat_val.st_mtime, stat_val.st_dev, - stat_val.st_ino, stat_val.st_mode, stat_val.st_uid, + stat_val.st_ino, mode, stat_val.st_uid,   stat_val.st_gid, stat_val.st_size, hex_sha, flags)
 
191
192
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
@@ -191,3 +191,21 @@
  12288,   '2222222222222222222222222222222222222222',   0)) + + def test_override_mode(self): + st = posix.stat_result((stat.S_IFREG + 0644, 131078, 64769L, + 154, 1000, 1000, 12288, + 1323629595, 1324180496, 1324180496)) + entry = index_entry_from_stat(st, "22" * 20, 0, + mode=stat.S_IFREG + 0755) + self.assertEquals(entry, ( + 1324180496, + 1324180496, + 64769L, + 131078, + 33261, + 1000, + 1000, + 12288, + '2222222222222222222222222222222222222222', + 0))