title: Installing previous versions of a formula with brew extract
body: <p>Due to a <a href="https://github.com/Homebrew/homebrew-core/issues/53193" rel="noreferrer">problem</a> with the Subversion 1.13 Brew formula I was installing an older revision of the formula:</p>
  <pre><code>brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0c3d786402ad7d9dd5eb6907e3ed3f2525a0472d/Formula/subversion.rb
  </code></pre>
  <p>That gives a warning:</p>
  <pre><code>Warning: Calling Installation of subversion from a GitHub commit URL is deprecated! Use 'brew extract subversion' to stable tap on GitHub instead.
  </code></pre>
  <p>The suggestion is the same as <a href="https://docs.brew.sh/Tips-N%27-Tricks#installing-previous-versions-of-formulae" rel="noreferrer">this tip</a>.</p>
  <p>Now, I'd like to do this properly using <code>brew extract subversion</code> rather than using the deprecated commit URL. I'd like to install Subversion 1.13_5 on some computers, but Subversion 1.14 is the latest formula.</p>
  <p>I need to do something like this: <code>brew extract --version 1.13.0_5 subversion &lt;tap&gt;</code>.</p>
  <p>The way I understand this I should:</p>
  <ol>
  <li>Create an empty repository for my versioned formulas</li>
  <li>Add the repository as a tap and initialize it</li>
  <li>Extract the versioned formula</li>
  <li>Commit and push the formula?</li>
  </ol>
  <p>I created an <a href="https://github.com/rjollos/homebrew-versioned" rel="noreferrer">empty repository</a>, then:</p>
  <pre><code>$ brew tap rjollos/homebrew-versioned
  Cloning into '/usr/local/Homebrew/Library/Taps/rjollos/homebrew-versioned'...
  warning: You appear to have cloned an empty repository.
  Tapped (16 files, 22.2KB).
  $ brew tap-new rjollos/homebrew-versioned
  ==&gt; Created rjollos/versioned
  /usr/local/Homebrew/Library/Taps/rjollos/homebrew-versioned
  $ brew extract --version '1.13.0_5' subversion rjollos/homebrew-versioned
  ==&gt; Searching repository history
  Warning: Calling 'devel' blocks in formulae is deprecated! Use 'head' blocks or @-versioned formulae instead.
  Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
    /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/subversion.rb:16
  
  Warning: Calling 'devel' blocks ... (repeats about a dozen times)
  
  Error: subversion: undefined method `sha1' for #&lt;SoftwareSpec:0x00007fceaf144490&gt;
  </code></pre>
  <p>I think I'm doing several things wrong, but mainly I'm unsure why <code>brew extract</code> doesn't work. Also, is there a better way to create a new repository and populate it with the template files for a new tap?</p>
  <pre><code>$ brew --version
  Homebrew 2.4.4-19-ge09802b
  Homebrew/homebrew-core (git revision 5ee797; last commit 2020-07-07)
  Homebrew/homebrew-cask (git revision 837ac; last commit 2020-07-08)
  </code></pre>