##// END OF EJS Templates
transaction: use newlines to separate description elements
Matt Mackall -
r10892:e39e9437 default
parent child Browse files
Show More
@@ -572,7 +572,7 b' class localrepository(repo.repository):'
572 ds = ""
572 ds = ""
573 self.opener("journal.dirstate", "w").write(ds)
573 self.opener("journal.dirstate", "w").write(ds)
574 self.opener("journal.branch", "w").write(self.dirstate.branch())
574 self.opener("journal.branch", "w").write(self.dirstate.branch())
575 self.opener("journal.desc", "w").write("%d,%s" % (len(self), desc))
575 self.opener("journal.desc", "w").write("%d\n%s\n" % (len(self), desc))
576
576
577 renames = [(self.sjoin("journal"), self.sjoin("undo")),
577 renames = [(self.sjoin("journal"), self.sjoin("undo")),
578 (self.join("journal.dirstate"), self.join("undo.dirstate")),
578 (self.join("journal.dirstate"), self.join("undo.dirstate")),
@@ -607,14 +607,14 b' class localrepository(repo.repository):'
607 lock = self.lock()
607 lock = self.lock()
608 if os.path.exists(self.sjoin("undo")):
608 if os.path.exists(self.sjoin("undo")):
609 try:
609 try:
610 args = self.opener("undo.desc", "r").read().split(",")
610 args = self.opener("undo.desc", "r").read().splitlines()
611 if len(args) == 3 and self.ui.verbose:
611 if len(args) >= 3 and self.ui.verbose:
612 desc = _("rolling back %s (%s) to revision %s\n") % (
612 desc = _("rolling back %s (%s) to revision %s\n") % (
613 args[1], args[2], args[0])
613 args[1], args[2], args[0])
614 else:
614 elif len(args) >= 2:
615 desc = _("rolling back %s to revision %s\n") % (
615 desc = _("rolling back %s to revision %s\n") % (
616 args[1], args[0])
616 args[1], args[0])
617 except (IOError, IndexError):
617 except IOError:
618 desc = _("rolling back unknown transaction\n")
618 desc = _("rolling back unknown transaction\n")
619 self.ui.status(desc)
619 self.ui.status(desc)
620 if dryrun:
620 if dryrun:
@@ -2019,7 +2019,7 b' class localrepository(repo.repository):'
2019 cl.delayupdate()
2019 cl.delayupdate()
2020 oldheads = len(cl.heads())
2020 oldheads = len(cl.heads())
2021
2021
2022 tr = self.transaction(",".join([srctype, urlmod.hidepassword(url)]))
2022 tr = self.transaction("\n".join([srctype, urlmod.hidepassword(url)]))
2023 try:
2023 try:
2024 trp = weakref.proxy(tr)
2024 trp = weakref.proxy(tr)
2025 # pull off the changeset group
2025 # pull off the changeset group
General Comments 0
You need to be logged in to leave comments. Login now