Changes between Version 3 and Version 4 of pm-svn-externals


Ignore:
Timestamp:
Jun 15, 2006 2:56:20 PM (14 years ago)
Author:
lou
Comment:

Added a few more words re. changing svn:externals; typos, readability

Legend:

Unmodified
Added
Removed
Modified
  • pm-svn-externals

    v3 v4  
    11= Handling Svn Externals =
    22
    3 Externals allow subversion to download additional packages from other subversion repositories.  For example, the COIN project {{{Clp}}} requires the COIN project {{{CoinUtils}}} to be compiled.  Therefore, the {{{Clp}}} repository has externals defined, so that {{{Clp}}} is automatically downloaded when a user checks out {{{Clp}}}.
     3Externals allow subversion to download additional packages from other subversion repositories.  For example, the COIN project {{{Clp}}} requires the COIN project {{{CoinUtils}}} to be compiled.  Therefore, the {{{Clp}}} repository has externals defined so that {{{CoinUtils}}} is automatically downloaded when a user checks out {{{Clp}}}.
    44
    55== Basics ==
    66
    7 Externals are properties associated with directories in a subversion repository (with the name {{{svn:externals}}}).  If someone checks out such a directory, the corresponding externals (defined as URL) are also checked out, into subdirectores of that directory.  The names of those subdirectories, as well as the URL, are defined in the {{{svn:externals}}} property.  It is possible to specify a specific revision number of the externals that is to be downloaded.  This helps us in COIN to make sure that people get a compatible version of the dependency; the latest {{{trunk}}} version of the dependency might not work with the code of the package one tries to download and compile, if the development of the dependecy has proceeded.
     7Externals are defined as a property associated with a directory in a subversion repository (with the name {{{svn:externals}}}).  If someone checks out such a directory, the corresponding externals (defined as URLs) are also checked out, into subdirectores of that directory.  The names of those subdirectories, as well as the URL, are defined in the {{{svn:externals}}} property.  It is possible to specify a specific revision number for an external.  This helps us in COIN to make sure that people get a compatible version of the dependency; the latest {{{trunk}}} version of the dependency might not work with the code of the package one tries to download and compile, if the development of the dependency has proceeded.
    88
    9 Externals are checked out recursively, i.e., if there is an {{{svn:externals}}} property defined in an external, it is also downloaded.  On can suppress the checkout (or the action of other {{{svn}}} commands) of externals by specifying the {{{--ignore-externals}}} flag.
     9Externals are checked out recursively, ''i.e.'', if there is an {{{svn:externals}}} property defined in a directory downloaded for an external, it is also downloaded.  One can suppress the checkout (or the action of other {{{svn}}} commands) of externals by specifying the {{{--ignore-externals}}} flag.
    1010
    1111== Externals in COIN ==
    1212
    13 In COIN, we use externals mainly to make sure that COIN packages, which require other COIN packages, obtain the dependency code automatically.
     13In COIN, we use externals mainly to make sure that COIN packages which require other COIN packages obtain the dependency code automatically.
    1414
    15 Our policy for managing externals in COIN is that we put a file called {{{Externals}}} into the directory, for which the {{{svn:externals}}} property is set.  For example, the {{{Externals}}} file in the base directory for the {{{Clp}}} package might look like this:
     15Our policy for managing externals in COIN is that we put a file called {{{Externals}}} into the directory, from which the {{{svn:externals}}} property is set.  For example, the {{{Externals}}} file in the base directory for the {{{Clp}}} package might look like this:
    1616
    1717{{{
     
    2222}}}
    2323
    24 The first column specifies the directory of the base directory, into which the externals is to be downloaded (this can be several levels of subdirectories).  After this, one can optionally specify the revision number of the dependency code that it to be obtained (using the {{{-rN}}} flag, where {{{N}}} is the revision number.  The last column is the URL that specifies the repository for the dependency.
     24The first column specifies the directory (relative to the current directory) into which the external is to be placed (this can specify several levels of subdirectories).  After this, one can optionally specify the revision number of the dependency code that is to be obtained using the {{{-rN}}} flag, where {{{N}}} is the revision number.  The last column is the URL that specifies the repository for the dependency.
    2525
    2626== Changing Externals ==
    2727
    28 To see the value of a property (such as {{{svn:externals}}} one uses the {{{svn propget}}} command.  For example, to see the current value set for the externals in the {{{Clp}}} base directory, you go into the {{{Clp}}} base directory and issue the command
     28To see the value of a property (such as {{{svn:externals}}}) one uses the {{{svn propget}}} command.  For example, to see the current value set for the externals in the {{{Clp}}} base directory, you go into the {{{Clp}}} base directory and issue the command
    2929
    3030{{{
     
    3232}}}
    3333
    34 If you want to change the value of a property, you use the {{{svn propset}}} command.  In COIN, we find it good practice to use the Externals file, so that also users that don't have {{{svn}}} can see, what the dependencies are.  Assuming that you have edited the {{{Externals}}} file in a directory, you can use this file to update the externals.  For this, you enter the command
    35 
     34If you want to change the value of a property, you use the {{{svn propset}}} command.  In COIN, we find it good practice to use the Externals file, so that users that don't have {{{svn}}} can also see  the dependencies. You can edit the {{{Externals}}} file to add or remove external dependencies. Once you have edited the {{{Externals}}} file in a directory, you can use this file to update the
     35{{{svn:externals}}} property with the command
    3636{{{
    3737svn propset svn:externals -F Externals .
    3838}}}
     39The {{{-F}}} flag tells {{{svn}}} to take the content of the file as the value of the property to be set.  Once the {{{svn:externals}}} property has been updated, new dependencies added to the {{{Externals}}} file will be downloaded at the next {{{svn update}}}
     40command, and dependencies removed from the
     41{{{Externals}}} file will be removed from subversion's records.
     42(However, the directories must be removed by hand, after you've run
     43{{{svn update}}}.)
    3944
    40 The {{{-F}}} flag tells {{{svn}}} to take the content of the file as the value of the property to be set.  In order to actually get the code that you specified in the external definition, you need to do an {{{svn update}}}.
    41 
    42 Finally, if you decided to get rid of externals in a directory, you should delete the {{{Externals}}} file, and delete the {{{svn:externals}}} property with
     45Finally, if you decide to completely eliminate externals in a directory, you should delete the {{{Externals}}} file, and delete the {{{svn:externals}}} property with
    4346
    4447{{{
     
    4649}}}
    4750
    48 '''Note:''' If you have configured your local copy with the {{{--enable-maintainder-mode}}} and have {{{svn}}} available on your system, the Makefiles will automatically do the {{{svn propset}}} command for you, when you changed the {{{Externals}}} file.  However, you will need to run the {{{svn update}}} command by hand.
     51'''Note:''' If you have configured your local copy with the {{{--enable-maintainer-mode}}} and have {{{svn}}} available on your system, the Makefiles will automatically do the {{{svn propset}}} command for you when you change the {{{Externals}}} file.  However, you will need to run the {{{svn update}}} command by hand.
    4952
    5053More information about externals can be obtained in the [http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html Externals Definitions] chapter of the subversion book.