Show More
@@ -1250,7 +1250,7 b' class manifestrevlog(revlog.revlog):' | |||||
1250 | def _addtree(self, m, transaction, link, m1, m2, readtree): |
|
1250 | def _addtree(self, m, transaction, link, m1, m2, readtree): | |
1251 | # If the manifest is unchanged compared to one parent, |
|
1251 | # If the manifest is unchanged compared to one parent, | |
1252 | # don't write a new revision |
|
1252 | # don't write a new revision | |
1253 | if m.unmodifiedsince(m1) or m.unmodifiedsince(m2): |
|
1253 | if self._dir != '' and (m.unmodifiedsince(m1) or m.unmodifiedsince(m2)): | |
1254 | return m.node() |
|
1254 | return m.node() | |
1255 | def writesubtree(subm, subp1, subp2): |
|
1255 | def writesubtree(subm, subp1, subp2): | |
1256 | sublog = self.dirlog(subm.dir()) |
|
1256 | sublog = self.dirlog(subm.dir()) | |
@@ -1258,13 +1258,17 b' class manifestrevlog(revlog.revlog):' | |||||
1258 | readtree=readtree) |
|
1258 | readtree=readtree) | |
1259 | m.writesubtrees(m1, m2, writesubtree) |
|
1259 | m.writesubtrees(m1, m2, writesubtree) | |
1260 | text = m.dirtext(self._usemanifestv2) |
|
1260 | text = m.dirtext(self._usemanifestv2) | |
|
1261 | n = None | |||
|
1262 | if self._dir != '': | |||
1261 | # Double-check whether contents are unchanged to one parent |
|
1263 | # Double-check whether contents are unchanged to one parent | |
1262 | if text == m1.dirtext(self._usemanifestv2): |
|
1264 | if text == m1.dirtext(self._usemanifestv2): | |
1263 | n = m1.node() |
|
1265 | n = m1.node() | |
1264 | elif text == m2.dirtext(self._usemanifestv2): |
|
1266 | elif text == m2.dirtext(self._usemanifestv2): | |
1265 | n = m2.node() |
|
1267 | n = m2.node() | |
1266 | else: |
|
1268 | ||
|
1269 | if not n: | |||
1267 | n = self.addrevision(text, transaction, link, m1.node(), m2.node()) |
|
1270 | n = self.addrevision(text, transaction, link, m1.node(), m2.node()) | |
|
1271 | ||||
1268 | # Save nodeid so parent manifest can calculate its nodeid |
|
1272 | # Save nodeid so parent manifest can calculate its nodeid | |
1269 | m.setnode(n) |
|
1273 | m.setnode(n) | |
1270 | return n |
|
1274 | return n |
@@ -857,3 +857,13 b' other branch' | |||||
857 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
857 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
858 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
858 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
859 |
|
859 | |||
|
860 | Committing a empty commit does not duplicate root treemanifest | |||
|
861 | $ echo z >> z | |||
|
862 | $ hg commit -Aqm 'pre-empty commit' | |||
|
863 | $ hg rm z | |||
|
864 | $ hg commit --amend -m 'empty commit' | |||
|
865 | saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-de37743b-amend-backup.hg (glob) | |||
|
866 | $ hg log -r 'tip + tip^' -T '{manifest}\n' | |||
|
867 | 1:678d3574b88c | |||
|
868 | 1:678d3574b88c | |||
|
869 | $ hg --config extensions.strip= strip -r . -q |
General Comments 0
You need to be logged in to leave comments.
Login now