comparison 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
comparison
equal deleted inserted replaced
7515:ee5aba886108 7516:a8376f2aa3b1
732 self._date = date and util.parsedate(date) or util.makedate() 732 self._date = date and util.parsedate(date) or util.makedate()
733 self._user = user 733 self._user = user
734 parents = [(p or nullid) for p in parents] 734 parents = [(p or nullid) for p in parents]
735 p1, p2 = parents 735 p1, p2 = parents
736 self._parents = [changectx(self._repo, p) for p in (p1, p2)] 736 self._parents = [changectx(self._repo, p) for p in (p1, p2)]
737 files = util.sort(list(files)) 737 files = util.sort(util.unique(files))
738 self._status = [files, [], [], [], []] 738 self._status = [files, [], [], [], []]
739 self._filectxfn = filectxfn 739 self._filectxfn = filectxfn
740 740
741 self._extra = extra and extra.copy() or {} 741 self._extra = extra and extra.copy() or {}
742 if 'branch' not in self._extra: 742 if 'branch' not in self._extra: