Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 7516:a8376f2aa3b1
context: enforce memctx.files() unicity
localrepo.commitctx() expects changed files lists to contain unique items and
does not sort itself. Passing duplicates makes them evaluated more than once
and changes the committed changelog id.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 14 Dec 2008 17:35:19 +0100 |
parents | 595ba2537d4f |
children | 08cabecfa8a8 |
line wrap: on
line diff
--- a/mercurial/context.py Sat Dec 13 18:32:29 2008 +0100 +++ b/mercurial/context.py Sun Dec 14 17:35:19 2008 +0100 @@ -734,7 +734,7 @@ parents = [(p or nullid) for p in parents] p1, p2 = parents self._parents = [changectx(self._repo, p) for p in (p1, p2)] - files = util.sort(list(files)) + files = util.sort(util.unique(files)) self._status = [files, [], [], [], []] self._filectxfn = filectxfn