Mercurial > hgsubversion
comparison push_cmd.py @ 163:fdc249cd1a0a
Combine sort and reverse.
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Tue, 30 Dec 2008 19:24:16 -0600 |
parents | 1fde85a10f9e |
children | b77a4caaf77b |
comparison
equal
deleted
inserted
replaced
162:7a58ff3502b7 | 163:fdc249cd1a0a |
---|---|
210 file_data[file] = base_data, new_data, action | 210 file_data[file] = base_data, new_data, action |
211 | 211 |
212 # Now we are done with files, we can prune deleted directories | 212 # Now we are done with files, we can prune deleted directories |
213 # against themselves: ignore a/b if a/ is already removed | 213 # against themselves: ignore a/b if a/ is already removed |
214 deleteddirs2 = list(deleteddirs) | 214 deleteddirs2 = list(deleteddirs) |
215 deleteddirs2.sort() | 215 deleteddirs2.sort(reverse=True) |
216 deleteddirs2.reverse() | |
217 for d in deleteddirs2: | 216 for d in deleteddirs2: |
218 pos = d.rfind('/') | 217 pos = d.rfind('/') |
219 if pos >= 0 and d[:pos] in deleteddirs: | 218 if pos >= 0 and d[:pos] in deleteddirs: |
220 deleteddirs.remove(d[:pos]) | 219 deleteddirs.remove(d[:pos]) |
221 | 220 |