comparison hgext/largefiles/overrides.py @ 18364:6252b4f1c4b4

subrepos: process subrepos in sorted order Add sorted() in places found by testing with PYTHONHASHSEED=random and code inspection. An alternative to sprinkling sorted() all over would be to change substate to a custom dict with sorted iterators...
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 12 Dec 2012 02:38:14 +0100
parents ed23d6100dd3
children de685145f5c2
comparison
equal deleted inserted replaced
18363:c6e033a7dd38 18364:6252b4f1c4b4
869 869
870 getdata = getdatafn 870 getdata = getdatafn
871 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) 871 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata)
872 872
873 if subrepos: 873 if subrepos:
874 for subpath in ctx.substate: 874 for subpath in sorted(ctx.substate):
875 sub = ctx.sub(subpath) 875 sub = ctx.sub(subpath)
876 submatch = match_.narrowmatcher(subpath, matchfn) 876 submatch = match_.narrowmatcher(subpath, matchfn)
877 sub.archive(repo.ui, archiver, prefix, submatch) 877 sub.archive(repo.ui, archiver, prefix, submatch)
878 878
879 archiver.done() 879 archiver.done()
916 916
917 getdata = getdatafn 917 getdata = getdatafn
918 918
919 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) 919 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata)
920 920
921 for subpath in ctx.substate: 921 for subpath in sorted(ctx.substate):
922 sub = ctx.sub(subpath) 922 sub = ctx.sub(subpath)
923 submatch = match_.narrowmatcher(subpath, match) 923 submatch = match_.narrowmatcher(subpath, match)
924 sub.archive(ui, archiver, os.path.join(prefix, repo._path) + '/', 924 sub.archive(ui, archiver, os.path.join(prefix, repo._path) + '/',
925 submatch) 925 submatch)
926 926