# HG changeset patch # User Martin von Zweigbergk # Date 1474301672 25200 # Node ID 94ebf56db04e5df659c4763f94c693d46005eab3 # Parent 44ef21621ad7d0b5782cb3b016b70f0653fe75c2 strip: clarify that user action is required to recover temp bundle If strip fails when applying the temporary bundle, the commits in the temporary bundle have not yet been applied, so the user will almost definitely want to apply the bundle. We should be more clear to the user about that than our current "partial bundle stored in...". Note that we will probably not be able to recover it automatically, since whatever made it fail (e.g. a hook) will most likely make it fail again. We need to give control back to the user to fix the problem before trying again. diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -231,8 +231,10 @@ ui.warn(_("strip failed, full bundle stored in '%s'\n") % vfs.join(backupfile)) if chgrpfile: - ui.warn(_("strip failed, partial bundle stored in '%s'\n") + ui.warn(_("strip failed, unrecovered changes stored in '%s'\n") % vfs.join(chgrpfile)) + ui.warn(_("(fix the problem, then recover the changesets with " + "\"hg unbundle '%s'\")\n") % vfs.join(chgrpfile)) raise else: if chgrpfile: diff --git a/tests/test-strip.t b/tests/test-strip.t --- a/tests/test-strip.t +++ b/tests/test-strip.t @@ -375,7 +375,8 @@ transaction abort! rollback completed strip failed, full bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) - strip failed, partial bundle stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) + strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) + (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) abort: pretxnchangegroup.bad hook exited with status 1 [255] $ restore