# HG changeset patch # User Matt Mackall # Date 1214609325 18000 # Node ID 3989df387ff721bc31ea4c27ad9e16c82e614e18 # Parent 644b640cb3d0e5bf495c174d0a6692d707a458af util: add sort helper [ original upstream description] diff -r 644b640cb3d0 -r 3989df387ff7 hgkw/keyword.py --- a/hgkw/keyword.py Fri Jun 27 13:43:29 2008 -0500 +++ b/hgkw/keyword.py Fri Jun 27 18:28:45 2008 -0500 @@ -185,7 +185,6 @@ candidates = [f for f in files if self.iskwfile(f, ctx.flags)] if candidates: self.restrict = True # do not expand when reading - candidates.sort() action = expand and 'expanding' or 'shrinking' for f in candidates: fp = self.repo.file(f) @@ -384,8 +383,7 @@ kwt = kwtools['templater'] status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts) modified, added, removed, deleted, unknown, ignored, clean = status - files = modified + added + clean + unknown - files.sort() + files = util.sort(modified + added + clean + unknown) wctx = repo[None] kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)] cwd = pats and repo.getcwd() or ''