<commit_before>class GitRemoteHg < Formula
  include Language::Python::Virtualenv

  desc "Transparent bidirectional bridge between Git and Mercurial"
  homepage "https://github.com/felipec/git-remote-hg"
  url "https://github.com/felipec/git-remote-hg/archive/v0.4.tar.gz"
  sha256 "916072d134cde65b7ffa7d1da1acaabb0f29b65c017d0560e907e7a94063d1b1"
  head "https://github.com/felipec/git-remote-hg.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "fd29f07fbc50952fa8f97420e26f07f9fe4d26222620f1c8b8cf50a0236b0643" => :catalina
    sha256 "d31145dbac316f9c7540d75dd6aafbcc4a2e075ec9c021efd41b4c087c186c1d" => :mojave
    sha256 "cae74b1c19b7f028810a213128de4ae3b33c909930ff25e76209bfbd65b9bbb7" => :high_sierra
    sha256 "d21a60283d278cd8e4fb3d5c76622edf49b64a19b300dbb5f71c91f967eed610" => :sierra
  end

  depends_on "mercurial"
  depends_on "python@2" # does not support Python 3

  conflicts_with "git-cinnabar", :because => "both install `git-remote-hg` binaries"

  resource "hg" do
    url "https://mercurial-scm.org/release/mercurial-4.1.3.tar.gz"
    sha256 "103d2ae187d5c94110c0e86ccc3b46f55fcd8e21c78d1c209bac7b59a73e86d8"
  end

  def install
    venv = virtualenv_create(libexec)
    venv.pip_install resource("hg")
    inreplace "git-remote-hg", /#!.*/, "#!#{libexec}/bin/python"
    system "make", "install", "prefix=#{prefix}"
  end

  test do
    system "git", "clone", "hg::https://www.mercurial-scm.org/repo/hello"
  end<commit_msg>git-remote-hg: Use system Python 2<commit_after>class GitRemoteHg < Formula
  include Language::Python::Virtualenv

  desc "Transparent bidirectional bridge between Git and Mercurial"
  homepage "https://github.com/felipec/git-remote-hg"
  url "https://github.com/felipec/git-remote-hg/archive/v0.4.tar.gz"
  sha256 "916072d134cde65b7ffa7d1da1acaabb0f29b65c017d0560e907e7a94063d1b1"
  revision 1
  head "https://github.com/felipec/git-remote-hg.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "fd29f07fbc50952fa8f97420e26f07f9fe4d26222620f1c8b8cf50a0236b0643" => :catalina
    sha256 "d31145dbac316f9c7540d75dd6aafbcc4a2e075ec9c021efd41b4c087c186c1d" => :mojave
    sha256 "cae74b1c19b7f028810a213128de4ae3b33c909930ff25e76209bfbd65b9bbb7" => :high_sierra
    sha256 "d21a60283d278cd8e4fb3d5c76622edf49b64a19b300dbb5f71c91f967eed610" => :sierra
  end

  depends_on "mercurial"
  uses_from_macos "python@2" # does not support Python 3

  conflicts_with "git-cinnabar", :because => "both install `git-remote-hg` binaries"

  resource "hg" do
    url "https://mercurial-scm.org/release/mercurial-4.1.3.tar.gz"
    sha256 "103d2ae187d5c94110c0e86ccc3b46f55fcd8e21c78d1c209bac7b59a73e86d8"
  end

  def install
    venv = virtualenv_create(libexec)
    venv.pip_install resource("hg")
    inreplace "git-remote-hg", /#!.*/, "#!#{libexec}/bin/python"
    system "make", "install", "prefix=#{prefix}"
  end

  test do
    system "git", "clone", "hg::https://www.mercurial-scm.org/repo/hello"
  end
{'fraction_non_alphanumeric': 0.1122345803842265, 'fraction_numerical': 0.17323896191439164, 'mean_word_length': 5.144927536231884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5182262', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1286, 'n_words': 171}