Support of external files

Create issue
Issue #157 new
Jens Malte Gottfried created an issue

Since Subversion 1.6, external files are supported. More information about external files can be found here: http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-externals.html#tsvn-dug-externals-files

Running "hg svn updateexternals" on an repository containing external files, //hgsubversion// tries to get the external content by running "svn co ..." which does not work for single files (see e.g. http://stackoverflow.com/questions/122107/checkout-one-file-from-subversion). This may be fixed by replacing the "svn co" command by "svn export" for external files since "svn export ..." does work for single files. Perhaps this export variant may be called as second try, if "svn co" fails. This would not break the current behaviour on external directories. Unfortunately it's not possible to detect if "svn co" failed because called with a file instead of a directory or because the provided url is invalid, in both cases error code 1 is returned. Parsing the stdout output is difficult due to native language support of svn.

Comments (3)

  1. Jens Malte Gottfried reporter

    It is possible to get information about the kind of the external target by parsing output of svn info. As svn info output is yet parsed (svnexternals.py, line 170 and following) it should be easy to add some lines to check if the entry section looks like

    <?xml version="1.0"?> <info> <entry kind="dir" path="..." revision="668"> ...

    or like

    <?xml version="1.0"?> <info> <entry kind="file" path="..." revision="668">

  2. Augie Fackler repo owner

    As with all externals support requests, I'm treating this as nice-to-have, since externals are uncommon and painful to support.

    It's unlikely that I'll personally look at this, but I won't block reasonable patches to implement it. Note that projects that use external files are pretty rare since Ubuntu LTS (for one example) still ships with svn 1.4.

  3. Patrick M├ęzard

    Also, Mercurial subrepositories, the natural implementation for svn:externals, do not support this scenario, which makes it very unlikely to be integrated.

  4. Log in to comment