Mercurial > public > mercurial-scm > hg
diff mercurial/patch.py @ 6762:f67d1468ac50
util: add sort helper
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 27 Jun 2008 18:28:45 -0500 |
parents | 4faaa0535ea7 |
children | b2c4be19d7b1 |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Jun 27 14:53:30 2008 -0500 +++ b/mercurial/patch.py Fri Jun 27 18:28:45 2008 -0500 @@ -1094,8 +1094,7 @@ repo.copy(src, dst) removes = removes.keys() if removes: - removes.sort() - repo.remove(removes, True) + repo.remove(util.sort(removes), True) for f in patches: ctype, gp = patches[f] if gp and gp.mode: @@ -1113,9 +1112,7 @@ cmdutil.addremove(repo, cfiles) files = patches.keys() files.extend([r for r in removes if r not in files]) - files.sort() - - return files + return util.sort(files) def b85diff(to, tn): '''print base85-encoded binary diff''' @@ -1208,13 +1205,10 @@ for k, v in copy.items(): copy[v] = k - all = modified + added + removed - all.sort() gone = {} - gitmode = {'l': '120000', 'x': '100755', '': '100644'} - for f in all: + for f in util.sort(modified + added + removed): to = None tn = None dodiff = True