##// END OF EJS Templates
Revert almost all of 5be434785317; add a test...
Alexis S. L. Carvalho -
r3675:6990e499 default
parent child Browse files
Show More
@@ -0,0 +1,14 b''
1 #!/bin/sh
2
3 hg init dir
4 cd dir
5 echo bleh > bar
6 hg add bar
7 hg ci -m 'add bar'
8
9 hg cp bar foo
10 echo >> bar
11 hg ci -m 'cp bar foo; change bar'
12
13 hg debugrename foo
14 hg debugindex .hg/data/bar.i
@@ -0,0 +1,4 b''
1 foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
2 rev offset length base linkrev nodeid p1 p2
3 0 0 6 0 0 26d3ca0dfd18 000000000000 000000000000
4 1 6 7 1 1 d267bddd54f7 26d3ca0dfd18 000000000000
@@ -646,15 +646,14 b' class localrepository(repo.repository):'
646 tr = self.transaction()
646 tr = self.transaction()
647
647
648 # check in files
648 # check in files
649 new = []
649 new = {}
650 linkrev = self.changelog.count()
650 linkrev = self.changelog.count()
651 commit.sort()
651 commit.sort()
652 for f in commit:
652 for f in commit:
653 self.ui.note(f + "\n")
653 self.ui.note(f + "\n")
654 try:
654 try:
655 m1[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
655 new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
656 m1.set(f, util.is_exec(self.wjoin(f), m1.execf(f)))
656 m1.set(f, util.is_exec(self.wjoin(f), m1.execf(f)))
657 new.append(f)
658 except IOError:
657 except IOError:
659 if use_dirstate:
658 if use_dirstate:
660 self.ui.warn(_("trouble committing %s!\n") % f)
659 self.ui.warn(_("trouble committing %s!\n") % f)
@@ -663,6 +662,7 b' class localrepository(repo.repository):'
663 remove.append(f)
662 remove.append(f)
664
663
665 # update manifest
664 # update manifest
665 m1.update(new)
666 remove.sort()
666 remove.sort()
667
667
668 for f in remove:
668 for f in remove:
@@ -671,6 +671,9 b' class localrepository(repo.repository):'
671 mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new, remove))
671 mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new, remove))
672
672
673 # add changeset
673 # add changeset
674 new = new.keys()
675 new.sort()
676
674 user = user or self.ui.username()
677 user = user or self.ui.username()
675 if not text or force_editor:
678 if not text or force_editor:
676 edittext = []
679 edittext = []
General Comments 0
You need to be logged in to leave comments. Login now