Show More
@@ -759,6 +759,9 b' class treemanifest(object):' | |||
|
759 | 759 | _diff(self, m2) |
|
760 | 760 | return result |
|
761 | 761 | |
|
762 | def unmodifiedsince(self, m2): | |
|
763 | return not self._dirty and not m2._dirty and self._node == m2._node | |
|
764 | ||
|
762 | 765 | def parse(self, text, readsubtree): |
|
763 | 766 | for f, n, fl in _parse(text): |
|
764 | 767 | if fl == 'd': |
@@ -951,13 +954,16 b' class manifest(revlog.revlog):' | |||
|
951 | 954 | return n |
|
952 | 955 | |
|
953 | 956 | def _addtree(self, m, transaction, link, m1, m2): |
|
957 | # If the manifest is unchanged compared to one parent, | |
|
958 | # don't write a new revision | |
|
959 | if m.unmodifiedsince(m1) or m.unmodifiedsince(m2): | |
|
960 | return m.node() | |
|
954 | 961 | def writesubtree(subm, subp1, subp2): |
|
955 | 962 | sublog = self.dirlog(subm.dir()) |
|
956 | 963 | sublog.add(subm, transaction, link, subp1, subp2, None, None) |
|
957 | 964 | m.writesubtrees(m1, m2, writesubtree) |
|
958 | 965 | text = m.dirtext(self._usemanifestv2) |
|
959 |
# |
|
|
960 | # don't write a new revision | |
|
966 | # Double-check whether contents are unchanged to one parent | |
|
961 | 967 | if text == m1.dirtext(self._usemanifestv2): |
|
962 | 968 | n = m1.node() |
|
963 | 969 | elif text == m2.dirtext(self._usemanifestv2): |
General Comments 0
You need to be logged in to leave comments.
Login now