Hi,
I'm working with a moderately large codebase (around 100 MB). The way I
understand the "Switch to Branch/Tag" tool is that it replaces an entire
project with the desired branch/tag. So if I branch the entire codebase
and then switch to it, this results in several minutes of waiting while
100 MB of files are copied out of SVN, even if those files are identical
to what's already checked out. Therefore, when I work on feature
enhancements that only effect a couple files, I tend to avoid the Switch
tool and only branch the few files I need to modify, check them out as a
separate project, and manually copy and paste them into the project
containing the full codebase.
Obviously, this is a little awkward, and I'm trying to find a better
process. I notice that the Switch tool can switch a single directory or
file. However, would it be possible to Switch a set of directories and
files that are only contained in a target branch, and leave the local
files not contained in the branch untouched?
For example, suppose the complete codebase has a structure like:
/fileA.txt
/fileB.txt
/fileC.txt
/subdir1/fileD.txt
/subdir1/fileE.txt
/subdir1/fileF.txt
And suppose I have a partial branch like:
/fileB.txt
/subdir1/fileF.txt
If I use the current Switch tool to switch the entire root directory to
my partial branch, all files except fileB.txt and fileF.txt will be
deleted locally. However, I'd prefer that the files not present in the
branch remain untouched locally, while /fileB.txt and /subdir1/fileF.txt
are changed. I believe I can currently accomplish this by manually using
the Switch tool on fileB.txt and fileF.txt individually, but this
quickly becomes impractical as the number of files increases.
I'm considering writing a Python script to automate this process for me,
but I just wanted to post this as a sanity check. Is there no way to do
this with the current Switch tool? Is what I'm trying to do make sense,
or is there a better way?
Regards,
Chris
Received on 2008-07-02 14:55:43 CEST