Mercurial > hg
changeset 3377:9fe62e2db71d
rawcommit: add removed files to the changelog file list
patch by tonfa.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 12 Oct 2006 19:26:06 -0300 |
parents | b9a7c07fca0e |
children | 1106e00e6847 |
files | mercurial/localrepo.py tests/test-rawcommit1 tests/test-rawcommit1.out |
diffstat | 3 files changed, 40 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Oct 12 14:19:34 2006 -0700 +++ b/mercurial/localrepo.py Thu Oct 12 19:26:06 2006 -0300 @@ -510,6 +510,7 @@ m1 = self.manifest.read(c1[0]).copy() m2 = self.manifest.read(c2[0]) changed = [] + removed = [] if orig_parent == p1: update_dirstate = 1 @@ -530,13 +531,15 @@ del m1[f] if update_dirstate: self.dirstate.forget([f]) + removed.append(f) except: # deleted from p2? pass mnode = self.manifest.add(m1, tr, linkrev, c1[0], c2[0]) user = user or self.ui.username() - n = self.changelog.add(mnode, changed, text, tr, p1, p2, user, date) + n = self.changelog.add(mnode, changed + removed, text, + tr, p1, p2, user, date) tr.close() if update_dirstate: self.dirstate.setparents(n, nullid)
--- a/tests/test-rawcommit1 Thu Oct 12 14:19:34 2006 -0700 +++ b/tests/test-rawcommit1 Thu Oct 12 19:26:06 2006 -0300 @@ -10,24 +10,24 @@ echo this is c1 > c hg rawcommit -p 1 -d "1000000 0" -m2 c hg manifest 2 -hg parents +hg -v parents rm b hg rawcommit -p 2 -d "1000000 0" -m3 b hg manifest 3 -hg parents +hg -v parents echo this is a22 > a hg rawcommit -p 3 -d "1000000 0" -m4 a hg manifest 4 -hg parents +hg -v parents echo this is c22 > c hg rawcommit -p 1 -d "1000000 0" -m5 c hg manifest 5 -hg parents +hg -v parents # merge, but no files changed hg rawcommit -p 4 -p 5 -d "1000000 0" -m6 hg manifest 6 -hg parents +hg -v parents # no changes what-so-ever hg rawcommit -p 6 -d "1000000 0" -m7 hg manifest 7 -hg parents +hg -v parents
--- a/tests/test-rawcommit1.out Thu Oct 12 14:19:34 2006 -0700 +++ b/tests/test-rawcommit1.out Thu Oct 12 19:26:06 2006 -0300 @@ -8,52 +8,70 @@ tag: tip user: test date: Mon Jan 12 13:46:40 1970 +0000 -summary: 2 +files: c +description: +2 + (the rawcommit command is deprecated) 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c -changeset: 3:0f9843914735 +changeset: 3:20652cf30cc0 tag: tip user: test date: Mon Jan 12 13:46:40 1970 +0000 -summary: 3 +files: b +description: +3 + (the rawcommit command is deprecated) d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c -changeset: 4:909a3d1d3ee1 +changeset: 4:42556b925639 tag: tip user: test date: Mon Jan 12 13:46:40 1970 +0000 -summary: 4 +files: a +description: +4 + (the rawcommit command is deprecated) 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 644 a 54837d97f2932a8194e69745a280a2c11e61ff9c 644 b 3570202ceac2b52517df64ebd0a062cb0d8fe33a 644 c -changeset: 4:909a3d1d3ee1 +changeset: 4:42556b925639 user: test date: Mon Jan 12 13:46:40 1970 +0000 -summary: 4 +files: a +description: +4 + (the rawcommit command is deprecated) d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c -changeset: 6:725fdd0728db +changeset: 6:8a0c9254b0ab tag: tip -parent: 4:909a3d1d3ee1 +parent: 4:42556b925639 parent: 5:f56d4c64ab98 user: test date: Mon Jan 12 13:46:40 1970 +0000 -summary: 6 +files: +description: +6 + (the rawcommit command is deprecated) d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c -changeset: 7:2c11b55105cb +changeset: 7:a5a6e1f312b9 tag: tip user: test date: Mon Jan 12 13:46:40 1970 +0000 -summary: 7 +files: +description: +7 +