##// END OF EJS Templates
commit: simplify manifest commit
Matt Mackall -
r8498:a5182c39 default
parent child Browse files
Show More
@@ -843,7 +843,7 b' class localrepository(repo.repository):'
843 """
843 """
844
844
845 tr = lock = None
845 tr = lock = None
846 remove = ctx.removed()
846 removed = ctx.removed()
847 p1, p2 = ctx.p1(), ctx.p2()
847 p1, p2 = ctx.p1(), ctx.p2()
848 m1 = p1.manifest().copy()
848 m1 = p1.manifest().copy()
849 m2 = p2.manifest()
849 m2 = p2.manifest()
@@ -873,19 +873,16 b' class localrepository(repo.repository):'
873 self.ui.warn(_("trouble committing %s!\n") % f)
873 self.ui.warn(_("trouble committing %s!\n") % f)
874 raise
874 raise
875 else:
875 else:
876 remove.append(f)
876 removed.append(f)
877
877
878 # update manifest
878 # update manifest
879 m1.update(new)
879 m1.update(new)
880 removed = [f for f in sorted(remove) if f in m1 or f in m2]
880 removed = [f for f in sorted(removed) if f in m1 or f in m2]
881 removed1 = []
881 drop = [f for f in removed if f in m1]
882
882 for f in drop:
883 for f in removed:
883 del m1[f]
884 if f in m1:
885 del m1[f]
886 removed1.append(f)
887 mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(),
884 mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(),
888 p2.manifestnode(), (new, removed1))
885 p2.manifestnode(), (new, drop))
889
886
890 text = ctx.description()
887 text = ctx.description()
891 lines = [line.rstrip() for line in text.rstrip().splitlines()]
888 lines = [line.rstrip() for line in text.rstrip().splitlines()]
General Comments 0
You need to be logged in to leave comments. Login now