equal
deleted
inserted
replaced
711 lock = self.lock() |
711 lock = self.lock() |
712 if os.path.exists(self.sjoin("undo")): |
712 if os.path.exists(self.sjoin("undo")): |
713 try: |
713 try: |
714 args = self.opener("undo.desc", "r").read().splitlines() |
714 args = self.opener("undo.desc", "r").read().splitlines() |
715 if len(args) >= 3 and self.ui.verbose: |
715 if len(args) >= 3 and self.ui.verbose: |
716 desc = _("rolling back to revision %s" |
716 desc = _("repository tip rolled back to revision %s" |
717 " (undo %s: %s)\n") % ( |
717 " (undo %s: %s)\n") % ( |
718 int(args[0]) - 1, args[1], args[2]) |
718 int(args[0]) - 1, args[1], args[2]) |
719 elif len(args) >= 2: |
719 elif len(args) >= 2: |
720 desc = _("rolling back to revision %s (undo %s)\n") % ( |
720 desc = _("repository tip rolled back to revision %s" |
|
721 " (undo %s)\n") % ( |
721 int(args[0]) - 1, args[1]) |
722 int(args[0]) - 1, args[1]) |
722 except IOError: |
723 except IOError: |
723 desc = _("rolling back unknown transaction\n") |
724 desc = _("rolling back unknown transaction\n") |
724 self.ui.status(desc) |
725 self.ui.status(desc) |
725 if dryrun: |
726 if dryrun: |
738 "current branch still is: %s\n") |
739 "current branch still is: %s\n") |
739 % self.dirstate.branch()) |
740 % self.dirstate.branch()) |
740 self.invalidate() |
741 self.invalidate() |
741 self.dirstate.invalidate() |
742 self.dirstate.invalidate() |
742 self.destroyed() |
743 self.destroyed() |
|
744 self.ui.status(_("working directory now based on " |
|
745 "revision %s\n") % ( |
|
746 _(' and ').join(str(p.rev()) for p in self.parents()))) |
743 else: |
747 else: |
744 self.ui.warn(_("no rollback information available\n")) |
748 self.ui.warn(_("no rollback information available\n")) |
745 return 1 |
749 return 1 |
746 finally: |
750 finally: |
747 release(lock, wlock) |
751 release(lock, wlock) |