prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  HgCommitBear: Make asciinema
  
  
  </issue>
  <code>
  [start of bears/vcs/mercurial/HgCommitBear.py]
  1 import os
  2 import shutil
  3 
  4 from bears.vcs.CommitBear import _CommitBear
  5 from coala_utils.ContextManagers import change_directory
  6 from coalib.misc.Shell import run_shell_command
  7 
  8 
  9 class HgCommitBear(_CommitBear):
  10     LANGUAGES = {'Hg'}
  11     CAN_DETECT = {'Formatting'}
  12 
  13     @classmethod
  14     def check_prerequisites(cls):
  15         if shutil.which('hg') is None:
  16             return 'hg is not installed.'
  17         else:
  18             return True
  19 
  20     def get_remotes():
  21         remotes, _ = run_shell_command('hg paths')
  22         return remotes
  23 
  24     def get_head_commit(self):
  25         with change_directory(self.get_config_dir() or os.getcwd()):
  26             return run_shell_command('hg log -l 1 --template "{desc}"')
  27
  [end of bears/vcs/mercurial/HgCommitBear.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/bears/vcs/mercurial/HgCommitBear.py b/bears/vcs/mercurial/HgCommitBear.py
  --- a/bears/vcs/mercurial/HgCommitBear.py
  +++ b/bears/vcs/mercurial/HgCommitBear.py
  @@ -9,6 +9,7 @@
   class HgCommitBear(_CommitBear):
       LANGUAGES = {'Hg'}
       CAN_DETECT = {'Formatting'}
  +    ASCIINEMA_URL = 'https://asciinema.org/a/3Kfn2EDjYLmsbPoL7lRuLyhlN'
   
       @classmethod
       def check_prerequisites(cls):
  
verification_info: {"golden_diff": "diff --git a/bears/vcs/mercurial/HgCommitBear.py b/bears/vcs/mercurial/HgCommitBear.py\n--- a/bears/vcs/mercurial/HgCommitBear.py\n+++ b/bears/vcs/mercurial/HgCommitBear.py\n@@ -9,6 +9,7 @@\n class HgCommitBear(_CommitBear):\n     LANGUAGES = {'Hg'}\n     CAN_DETECT = {'Formatting'}\n+    ASCIINEMA_URL = 'https://asciinema.org/a/3Kfn2EDjYLmsbPoL7lRuLyhlN'\n \n     @classmethod\n     def check_prerequisites(cls):\n", "issue": "HgCommitBear: Make asciinema\n\n", "before_files": [{"content": "import os\nimport shutil\n\nfrom bears.vcs.CommitBear import _CommitBear\nfrom coala_utils.ContextManagers import change_directory\nfrom coalib.misc.Shell import run_shell_command\n\n\nclass HgCommitBear(_CommitBear):\n    LANGUAGES = {'Hg'}\n    CAN_DETECT = {'Formatting'}\n\n    @classmethod\n    def check_prerequisites(cls):\n        if shutil.which('hg') is None:\n            return 'hg is not installed.'\n        else:\n            return True\n\n    def get_remotes():\n        remotes, _ = run_shell_command('hg paths')\n        return remotes\n\n    def get_head_commit(self):\n        with change_directory(self.get_config_dir() or os.getcwd()):\n            return run_shell_command('hg log -l 1 --template \"{desc}\"')\n", "path": "bears/vcs/mercurial/HgCommitBear.py"}]}