Skip to content

Commit

Permalink
Extend the #207 detection error message when a bundle is stored.
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Feb 2, 2022
1 parent ef23945 commit d83fe38
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cinnabar/githg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,21 +1317,25 @@ def tagset_lines(tags):
"Error in file %s" % node.decode('ascii', 'replace'))
if busted:
import json
extra = ""
extra = bundle = ""
if getbundle_params:
extra = \
"If it failed, please also copy/paste the following:\n"
extra += json.dumps(getbundle_params, sort_keys=True, indent=4)
if check_enabled('unbundler') and "GIT_DIR" in os.environ:
bundle = "Please keep a copy of the "
bundle += os.environ["GIT_DIR"] + "/cinnabar-last-bundle file"
bundle += " before doing the following.\n"
raise Abort(
"It seems you have hit a known, rare, and difficult to "
"reproduce issue.\n"
"Your help would be appreciated.\n"
"Your help would be appreciated.\n" + bundle +
"Please try either `git cinnabar rollback` followed by the "
"same command that just\n"
"failed, or `git cinnabar reclone`.\n"
"Please open a new issue "
"(https://github.com/glandium/git-cinnabar/issues/new)\n"
"mentioning issue #207 and reporting whether the second "
"attempt succeeded.\n" + extra + "\n"
"Please keep a copy of this repository."
"Please read all the above and keep a copy of this repository."
)

0 comments on commit d83fe38

Please sign in to comment.