Show More
@@ -829,17 +829,12 b' class localrepository(repo.repository):' | |||
|
829 | 829 | tr = lock = None |
|
830 | 830 | valid = 0 # don't save the dirstate if this isn't set |
|
831 | 831 | remove = ctx.removed() |
|
832 | ||
|
833 | p1, p2 = [p.node() for p in ctx.parents()] | |
|
834 | c1 = self.changelog.read(p1) | |
|
835 | c2 = self.changelog.read(p2) | |
|
836 | m1 = self.manifest.read(c1[0]).copy() | |
|
837 | m2 = self.manifest.read(c2[0]) | |
|
832 | p1, p2 = ctx.p1(), ctx.p2() | |
|
833 | m1 = p1.manifest().copy() | |
|
834 | m2 = p2.manifest() | |
|
838 | 835 | user = ctx.user() |
|
839 | 836 | |
|
840 |
xp1, xp2 = hex( |
|
|
841 | if p2 == nullid: | |
|
842 | xp2 = '' | |
|
837 | xp1, xp2 = p1.hex(), p2 and p2.hex() or '' | |
|
843 | 838 | self.hook("precommit", throw=True, parent1=xp1, parent2=xp2) |
|
844 | 839 | |
|
845 | 840 | lock = self.lock() |
@@ -884,8 +879,8 b' class localrepository(repo.repository):' | |||
|
884 | 879 | if f in m1: |
|
885 | 880 | del m1[f] |
|
886 | 881 | removed1.append(f) |
|
887 |
mn = self.manifest.add(m1, trp, linkrev, |
|
|
888 | (new, removed1)) | |
|
882 | mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(), | |
|
883 | p2.manifestnode(), (new, removed1)) | |
|
889 | 884 | |
|
890 | 885 | text = ctx.description() |
|
891 | 886 | if editor: |
@@ -897,7 +892,8 b' class localrepository(repo.repository):' | |||
|
897 | 892 | text = '\n'.join(lines) |
|
898 | 893 | |
|
899 | 894 | self.changelog.delayupdate() |
|
900 |
n = self.changelog.add(mn, changed + removed, text, trp, |
|
|
895 | n = self.changelog.add(mn, changed + removed, text, trp, | |
|
896 | p1.node(), p2.node(), | |
|
901 | 897 | user, ctx.date(), ctx.extra().copy()) |
|
902 | 898 | p = lambda: self.changelog.writepending() and self.root or "" |
|
903 | 899 | self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, |
General Comments 0
You need to be logged in to leave comments.
Login now