Show More
@@ -611,7 +611,14 b' class localrepository(repo.repository):' | |||||
611 | m1 = self.manifest.read(c1[0]).copy() |
|
611 | m1 = self.manifest.read(c1[0]).copy() | |
612 | m2 = self.manifest.read(c2[0]) |
|
612 | m2 = self.manifest.read(c2[0]) | |
613 |
|
613 | |||
614 | if not commit and not remove and not force and p2 == nullid: |
|
614 | try: | |
|
615 | branchname = self.opener("branch").read().rstrip() | |||
|
616 | except IOError: | |||
|
617 | branchname = "" | |||
|
618 | oldname = c1[5].get("branch", "") | |||
|
619 | ||||
|
620 | if not commit and not remove and not force and p2 == nullid and \ | |||
|
621 | branchname == oldname: | |||
615 | self.ui.status(_("nothing changed\n")) |
|
622 | self.ui.status(_("nothing changed\n")) | |
616 | return None |
|
623 | return None | |
617 |
|
624 | |||
@@ -676,7 +683,11 b' class localrepository(repo.repository):' | |||||
676 | if not lines: |
|
683 | if not lines: | |
677 | return None |
|
684 | return None | |
678 | text = '\n'.join(lines) |
|
685 | text = '\n'.join(lines) | |
679 | n = self.changelog.add(mn, changed + remove, text, tr, p1, p2, user, date) |
|
686 | extra = {} | |
|
687 | if branchname: | |||
|
688 | extra["branch"] = branchname | |||
|
689 | n = self.changelog.add(mn, changed + remove, text, tr, p1, p2, | |||
|
690 | user, date, extra) | |||
680 | self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, |
|
691 | self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, | |
681 | parent2=xp2) |
|
692 | parent2=xp2) | |
682 | tr.close() |
|
693 | tr.close() |
General Comments 0
You need to be logged in to leave comments.
Login now