Show More
@@ -611,7 +611,14 class localrepository(repo.repository): | |||
|
611 | 611 | m1 = self.manifest.read(c1[0]).copy() |
|
612 | 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 | 622 | self.ui.status(_("nothing changed\n")) |
|
616 | 623 | return None |
|
617 | 624 | |
@@ -676,7 +683,11 class localrepository(repo.repository): | |||
|
676 | 683 | if not lines: |
|
677 | 684 | return None |
|
678 | 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 | 691 | self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, |
|
681 | 692 | parent2=xp2) |
|
682 | 693 | tr.close() |
General Comments 0
You need to be logged in to leave comments.
Login now