[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

SVN - sparse checkout of externals

From: Peter Kona <peter.kona_at_gmail.com>
Date: Wed, 23 Nov 2011 12:19:19 +0100

Good day,

I would like to thank you for this excelent version system. I am
working on migration from ClearCase to Subversion. I am using
TortoiseSVN and also SVN command line client. I try to find solution
for replacing ClearCase hardlinks in SVN. Suitable solution is using
of svn:externals in SVN 1.7. There is only one issue for this
solution. I can add external files to working copy only with command:

--------------------------------------------------------------------------------------------------------------------------
svn co --depth infinity file:///D:/sub_repo/myrepo/repo_dir
D:/SUBVERSION/local_dir
--------------------------------------------------------------------------------------------------------------------------
A D:\SUBVERSION\local_dir\file01.txt
A D:\SUBVERSION\local_dir\file02.txt
 U D:\SUBVERSION\local_dir

Fetching external item into 'D:\SUBVERSION\local_dir\link01.txt':
A D:\SUBVERSION\local_dir\link01.txt
Checked out external at revision 197.

Fetching external item into 'D:\SUBVERSION\local_dir\link02.txt':
A D:\SUBVERSION\local_dir\link02.txt
Checked out external at revision 197.

Checked out revision 197.

If I try to checkout only choosen files and external files (sparse
checkout), externals are not added to WC:

CREATING EMPTY WC:
--------------------------------------------------------------------------------------------------------------------------
svn co --depth empty file:///D:/sub_repo/myrepo/repo_dir D:/SUBVERSION/local_dir
--------------------------------------------------------------------------------------------------------------------------
 U D:\SUBVERSION\local_dir
Checked out revision 197.

ADDING FILE TO WC:
--------------------------------------------------------------------------------------------------------------------------
svn up D:/SUBVERSION/local_dir/file01.txt
--------------------------------------------------------------------------------------------------------------------------
Updating 'D:\SUBVERSION\local_dir\file01.txt':
A D:\SUBVERSION\local_dir\file01.txt
Updated to revision 197.

TRYING TO ADD EXTERNAL FILE TO WC - DOES NOT WORK:
--------------------------------------------------------------------------------------------------------------------------
svn up D:/SUBVERSION/local_dir/link01.txt
--------------------------------------------------------------------------------------------------------------------------
Updating 'D:\SUBVERSION\local_dir\link01.txt':
At revision 197.

This behavior is caused probably by filtering condition in source code
for externals:

libsvn_client / update.c ... and other files

  /* We handle externals after the update is complete, so that
     handling external items (and any errors therefrom) doesn't delay
     the primary operation. */
  if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
    { . . .

It is not possible to add choosen externals into WC also in
TortoiseSVN 1.7. External files are "skipped".

I do not know if this is an intention and there are some reasons for
this. As my folders contain many files and hardlinks (cca 1000) I have
to use sparse checkout in SVN and work only with choosen files and
external files in WC.

I would like to ask you if it is possible to replace in source code in
future version of SVN condition:
          if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
with only;
          if (! ignore_externals)

and by that allow to add external files to one WC together with files
of this WC.

Thank you very much.

Kind regards,
Peter Kona
Received on 2011-11-23 12:24:37 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.