Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commit.py @ 45345:6c56277317c2
commitctx: directly pass a ChangingFiles object to changelog.add
We pass the rich object to the changelog and it read the field it needs.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 25 Jul 2020 15:55:09 +0200 |
parents | aea6a812f7cb |
children | 99614011892b |
comparison
equal
deleted
inserted
replaced
45344:aea6a812f7cb | 45345:6c56277317c2 |
---|---|
82 # update changelog | 82 # update changelog |
83 repo.ui.note(_(b"committing changelog\n")) | 83 repo.ui.note(_(b"committing changelog\n")) |
84 repo.changelog.delayupdate(tr) | 84 repo.changelog.delayupdate(tr) |
85 n = repo.changelog.add( | 85 n = repo.changelog.add( |
86 mn, | 86 mn, |
87 files.touched, | 87 files, |
88 ctx.description(), | 88 ctx.description(), |
89 tr, | 89 tr, |
90 p1.node(), | 90 p1.node(), |
91 p2.node(), | 91 p2.node(), |
92 user, | 92 user, |
93 ctx.date(), | 93 ctx.date(), |
94 extra, | 94 extra, |
95 files.copied_from_p1, | |
96 files.copied_from_p2, | |
97 files.added, | |
98 files.removed, | |
99 ) | 95 ) |
100 xp1, xp2 = p1.hex(), p2 and p2.hex() or b'' | 96 xp1, xp2 = p1.hex(), p2 and p2.hex() or b'' |
101 repo.hook( | 97 repo.hook( |
102 b'pretxncommit', throw=True, node=hex(n), parent1=xp1, parent2=xp2, | 98 b'pretxncommit', throw=True, node=hex(n), parent1=xp1, parent2=xp2, |
103 ) | 99 ) |