<commit_before><?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">

<fileref>
  <header>
    <copyright>
      <year>1997</year><year>2011</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>appup</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
  </header>
  <file>appup</file>
  <filesummary>Application upgrade file.</filesummary>
  <description>
    <p>The <em>application upgrade file</em> defines how an application
      is upgraded or downgraded in a running system.</p>
    <p>This file is used by the functions in <c>systools</c> when
      generating a release upgrade file <c>relup</c>.</p>
  </description>

  <section>
    <title>FILE SYNTAX</title>
    <p>The application upgrade file should be called
      <c>Application.appup</c> where <c>Application</c> is the name of
      the application.  The file should be located in the <c>ebin</c>
      directory for the application.</p>
    <p>The <c>.appup</c> file contains one single Erlang term, which
      defines the instructions used to upgrade or downgrade
      the application.  The file has the following syntax:</p>
    <code type="none">
{Vsn,
  [{UpFromVsn, Instructions}, ...],
  [{DownToVsn, Instructions}, ...]}.
    </code>
    <list type="bulleted">
      <item>
        <p><c>Vsn = string()</c> is the current version of
          the application.</p>
      </item>
      <item>
        <p><c>UpFromVsn = string()</c> is an earlier version of
          the application to upgrade from.</p>
      </item>
      <item>
        <p><c>DownToVsn = string()</c> is an earlier version of
          the application to downgrade to.</p>
      </item>
      <item>
        <p><c>Instructions</c> is a list of <em>release upgrade instructions</em>, see below. It is recommended to use
          high-level instructions only. These are automatically
          translated to low-level instructions by <c>systools</c> when
          creating the <c>relup</c> file.</p>
      </item>
    </list>
  </section>

  <section>
    <title>RELEASE UPGRADE INSTRUCTIONS</title>
    <p>Release upgrade instructions are interpreted by the release
      handler when an upgrade or downgrade is made. For more
      information about release handling, refer to <em>OTP Design Principles</em>.</p>
    <p>A process is said to <em>use</em> a module <c>Mod</c>, if
      <c>Mod</c> is listed in the <c>Modules</c> part of the child
      specification used to start the process, see <c>supervisor(3)</c>.
      In the case of gen_event, an event manager process is said to use
      <c>Mod</c> if <c>Mod</c> is an installed event handler.</p>
    <p><em>High-level instructions</em></p>
    <pre>
{update, Mod}
{update, Mod, supervisor}
{update, Mod, Change}
{update, Mod, DepMods}
{update, Mod, Change, DepMods}
{update, Mod, Change, PrePurge, PostPurge, DepMods}
{update, Mod, Timeout, Change, PrePurge, PostPurge, DepMods}<commit_msg>Add documentation of regular expressions for version numbers in appup<commit_after><?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">

<fileref>
  <header>
    <copyright>
      <year>1997</year><year>2012</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>appup</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
  </header>
  <file>appup</file>
  <filesummary>Application upgrade file.</filesummary>
  <description>
    <p>The <em>application upgrade file</em> defines how an application
      is upgraded or downgraded in a running system.</p>
    <p>This file is used by the functions in <c>systools</c> when
      generating a release upgrade file <c>relup</c>.</p>
  </description>

  <section>
    <title>FILE SYNTAX</title>
    <p>The application upgrade file should be called
      <c>Application.appup</c> where <c>Application</c> is the name of
      the application.  The file should be located in the <c>ebin</c>
      directory for the application.</p>
    <p>The <c>.appup</c> file contains one single Erlang term, which
      defines the instructions used to upgrade or downgrade
      the application.  The file has the following syntax:</p>
    <code type="none">
{Vsn,
  [{UpFromVsn, Instructions}, ...],
  [{DownToVsn, Instructions}, ...]}.
    </code>
    <list type="bulleted">
      <item>
        <p><c>Vsn = string()</c> is the current version of
          the application.</p>
      </item>
      <item>
        <p><c>UpFromVsn = string() | binary()</c> is an earlier
          version of the application to upgrade from. If it is a
          string, it will be interpreted as a specific version
          number. If it is a binary, it will be interpreted as a
          regular expression which can match multiple version
          numbers.</p>
      </item>
      <item>
        <p><c>DownToVsn = string() | binary()</c> is an earlier
          version of the application to downgrade to. If it is a
          string, it will be interpreted as a specific version
          number. If it is a binary, it will be interpreted as a
          regular expression which can match multiple version
          numbers.</p>
      </item>
      <item>
        <p><c>Instructions</c> is a list of <em>release upgrade instructions</em>, see below. It is recommended to use
          high-level instructions only. These are automatically
          translated to low-level instructions by <c>systools</c> when
          creating the <c>relup</c> file.</p>
      </item>
    </list>
    <p>In order to avoid duplication of upgrade instructions it is
    allowed to use regular expressions to specify the <c>UpFromVsn</c>
    and <c>DownToVsn</c>. To be considered a regular expression, the
    version identifier must be specified as a binary, e.g.</p>
    <code type="none">&lt;&lt;"2\\.1\\.[0-9]+">></code>
    <p>will match all versions <c>2.1.x</c>, where x is any number.</p>
  </section>

  <section>
    <title>RELEASE UPGRADE INSTRUCTIONS</title>
    <p>Release upgrade instructions are interpreted by the release
      handler when an upgrade or downgrade is made. For more
      information about release handling, refer to <em>OTP Design Principles</em>.</p>
    <p>A process is said to <em>use</em> a module <c>Mod</c>, if
      <c>Mod</c> is listed in the <c>Modules</c> part of the child
      specification used to start the process, see <c>supervisor(3)</c>.
      In the case of gen_event, an event manager process is said to use
      <c>Mod</c> if <c>Mod</c> is an installed event handler.</p>
    <p><em>High-level instructions</em></p>
    <pre>
{update, Mod}
{update, Mod, supervisor}
{update, Mod, Change}
{update, Mod, DepMods}
{update, Mod, Change, DepMods}
{update, Mod, Change, PrePurge, PostPurge, DepMods}
{update, Mod, Timeout, Change, PrePurge, PostPurge, DepMods}
{'fraction_non_alphanumeric': 0.116455078125, 'fraction_numerical': 0.004150390625, 'mean_word_length': 2.9051477597712108, 'pattern_counts': {'":': 0, '<': 253, '<?xml version=': 2, '>': 255, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '4196814', 'n_tokens_mistral': 2471, 'n_tokens_neox': 2410, 'n_words': 929}