subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Corveleyn <>
Subject Re: How to create source dir for externals files?
Date Fri, 18 May 2018 08:01:42 GMT
On Fri, May 18, 2018 at 9:31 AM, Bo Berglund <> wrote:
> Problem:
> --------
> I have to modify an old application which was versioned at the time
> using CVS. Its last release was back in 2013.
> Migration to SVN:
> -----------------
> At the start of 2018 I migrated the CVS repository using cvs2svn so I
> have all of the files available in svn.
> CVS vs. SVN handling differences:
> ---------------------------------
> But in CVS the project checkout is not using a CVS folder as source
> but rather a "virtual module" defined in the CVSROOT/modules file. It
> turns out that this project in particular has used 3 different virtual
> folders embedded in the source tree but originating from three
> different physical folders in CVS.
> Using externals in SVN:
> -----------------------
> When migrating the CVS repository to SVN I had similar problems with
> some applications still in active development and what I did was this:
> I created a few subfolders below the source folders and copied in the
> files needed into these. This was done on the repository files before
> conversion.
> Then I did the cvs2svn conversion and following that I created
> externals in the projects that needed these files such that they would
> be checked out with the project. This has worked fine so far.
> Creating source folders for externals:
> --------------------------------------
> But for the application now in need of further work I did not do
> anything like that and now I need to do it but inside of SVN so I can
> get the same project functionality for these sources...
> Question:
> ---------
> Is it possible in svn to create subfolders in a main folder which
> contains a *selection* of files from the main folder?
> I want these files to be in the state they were in at an earlier date
> than today because they have been changed from what they were at the
> time and I need to get them as they were when a specific branch was
> created (in CVS). I am looking at the state on say 2013-11-01.
> If it is possible then what svn command is needed for the operation?
> I am on svn 1.9.7 both on the server and client sides.
> Both run on Windows, server is Windows Server 2016 and client is Win7.
> I use the command line svn client rather than Tortoise or other GUI
> tools.
> Any advice welcome.

I'm not entirely sure I fully understand what you need. But here are
some things that may help you:

- Of course you can create subfolders wherever you want in an svn
repository (important thing to realise about Subversion: it does not
attach any special meaning to any folders, not even to "/trunk" or
"/tags". For the Subversion system (both client and server) those are
all just folders in a directory structure).

- You can copy files from anywhere in your directory structure to
another part. The source of a copy can also be an older revision of a
file. So you can do a "historical copy" if you will. The operation to
copy something from a previous point in history is (assuming you're in
a working copy where you want the file to be copied to):

    svn copy $URL/path/to/file@OLDREV .

This will put the 'file' in your current working directory, with
contents as they were in OLDREV (and with svn metadata of "copied from
The nice thing about copying a file in this way (with 'svn copy' from
a historical URL) is that the line of history is preserved (due to the
"copied from" metadata). So if you 'svn log' that file, you'll still
see all of the old history too.

This technique is explained a bit more in "the book", in this chapter:

- As far as externals are concerned, here too you can create external
definitions that refer to older revisions of files, by adding a peg
revision or operative revision to the externals definition. See:
and you might also need to take a look at more explanation about "peg
revisions vs. operative revisions":


View raw message