Show More
@@ -579,8 +579,13 b' class localrepository(repo.repository):' | |||||
579 | self.ui.status(_("rolling back last transaction\n")) |
|
579 | self.ui.status(_("rolling back last transaction\n")) | |
580 | transaction.rollback(self.sopener, self.sjoin("undo")) |
|
580 | transaction.rollback(self.sopener, self.sjoin("undo")) | |
581 | util.rename(self.join("undo.dirstate"), self.join("dirstate")) |
|
581 | util.rename(self.join("undo.dirstate"), self.join("dirstate")) | |
582 | branch = self.opener("undo.branch").read() |
|
582 | try: | |
583 | self.dirstate.setbranch(branch) |
|
583 | branch = self.opener("undo.branch").read() | |
|
584 | self.dirstate.setbranch(branch) | |||
|
585 | except IOError: | |||
|
586 | self.ui.warn(_("Named branch could not be reset, " | |||
|
587 | "current branch still is: %s\n") | |||
|
588 | % util.tolocal(self.dirstate.branch())) | |||
584 | self.invalidate() |
|
589 | self.invalidate() | |
585 | self.dirstate.invalidate() |
|
590 | self.dirstate.invalidate() | |
586 | else: |
|
591 | else: |
@@ -14,8 +14,15 b' hg verify' | |||||
14 | hg parents |
|
14 | hg parents | |
15 | hg status |
|
15 | hg status | |
16 |
|
16 | |||
17 |
|
|
17 | echo % Test issue 902 | |
18 | hg commit -m "test" |
|
18 | hg commit -m "test" | |
19 | hg branch test |
|
19 | hg branch test | |
20 | hg rollback |
|
20 | hg rollback | |
21 | hg branch |
|
21 | hg branch | |
|
22 | ||||
|
23 | echo % Test rollback of hg before issue 902 was fixed | |||
|
24 | hg commit -m "test" | |||
|
25 | hg branch test | |||
|
26 | rm .hg/undo.branch | |||
|
27 | hg rollback | |||
|
28 | hg branch |
@@ -16,6 +16,12 b' crosschecking files in changesets and ma' | |||||
16 | checking files |
|
16 | checking files | |
17 | 0 files, 0 changesets, 0 total revisions |
|
17 | 0 files, 0 changesets, 0 total revisions | |
18 | A a |
|
18 | A a | |
|
19 | % Test issue 902 | |||
19 | marked working directory as branch test |
|
20 | marked working directory as branch test | |
20 | rolling back last transaction |
|
21 | rolling back last transaction | |
21 | default |
|
22 | default | |
|
23 | % Test rollback of hg before issue 902 was fixed | |||
|
24 | marked working directory as branch test | |||
|
25 | rolling back last transaction | |||
|
26 | Named branch could not be reset, current branch still is: test | |||
|
27 | test |
General Comments 0
You need to be logged in to leave comments.
Login now