Tortoise SVN linking single file to multiple path - tortoisesvn

I have a file that is to be placed in two different folders. Every time, I make an update to the file, I have to copy the file to the other path also and then commit to the repository. Is there a way in Tortoise SVN to make a sort of a link, like copy to a single path and commit to repository. The other folder should automatically grab the latest version that is linked to the path?

If file must be placed in different folders inside common repository, you have to use svn:externals - one file is real file, second - link to first file
Read SVN Book!

Related

How can I manage Linux settings (config) files in different directories in a single Git repo in another directory?

Suppose I have 6 different files on different locations which I want to put under one repo.
E.g. I have files like
~/bashrc
/etc/php.ini
/etc/apache.conf
/etc/virtualhosts.conf
/scripts/mybackup.sh
Now I want to put those in my one repo called My Scripts from one location, so that if I use git status and then if those files are modified then I can see those from one location. Can I use symlinks?
You can use symlinks. It is indeed what dotfiles managers such as homesick do. It is helpful to have a script to generate all the links automatically for you, in case you want to clone your setup to another box.

tortoise svn commit won't show some of my files

I have merged few bat and xml files from one branch to another. After merging, I was able to see all my files merged properly (these files were already in the branch I was merging to).
However, when I tried committing, under "changes made" section I only saw four of my files. Two were missing. The missing files had xml extension. I am afraid to commit since I do not see all of my files in the list.
Has anone ever encounter this problem before?
Try to Check Out your repository in another directory, at previous revision from this commit. Verify if your files are there.
If not, I'm afraid that your files were never versioned. Otherwise, verify if the files have the old content before your commit.

cvs commit and add files in single command

I am using CVS and I want to checkin/submit/commit multiple files. Also there are new files and I want to add those also for the same bug fix.
How can we achieve this in single command so that there will be only one comment/commit-message while committing.
When you cvs add a file, it only schedules the file for addition, it does not add the file to the repository or modify the repository in any way. When you are ready to commit your new and modified files, you can then do so with a single commit command which will then commit both the added files and the modified files to the repository with only the single comment for the commit.

Is there a way to use tortoise svn to backup my modified files?

I have a bunch of files that I've changed that I don't really want to commit, but I would like to back them up locally in case I would like to use them again. (Then I'll revert them.)
TortoiseSvn working status helps to view the modified files, but I want a way to save them all to a separate directory like Backups\, preferably with their folder heirararchy still in tact.
How can I do that?
UPDATE:
Apparently branching is the way to go.
But what I did was just copied the modified files paths to the clipboard (which is an option in tortoisesvn) then to a file, and created a program to copy them to a backup folder.
You can create a branch and commit those files only in that branch.
You can commit it inside a branch, so it doesn't affect your current 'trunk' or branch.
If you had a try with bazaar , that is compatible with SVN, there is a shelf command to temporarily store a set of modification and apply back them later.

How to exclude a folder and not its children from SVN Update in Tortoise SVN

I am working on a shared project which is put in SVN. The directory structure of the project is as follows:
ParentDir
- Child_Dir_1
+ GrandChild_Dir_1
+ GrandChild_Dir_2
- Child_Dir_2
Child_Dir_1 contains configuration files (Eclipse's .LAUNCH files), and people put all sorts of file in this folder.
So each time I update my source code (by right clicking on ParentDir and picking Update), I got a lot of configurations that I don't really need, and I have to delete them manually.
I still need to have the children of Child_Dir_1 (which are GrandChild_Dir_1 and GrandChild_Dir_2) to be updated.
I have tried to go to set the "ignore" property of the of Child_Dir_1 to exclude *.LAUNCH files, but each time I update the source code, the ones that I manually deleted are restored to Child_Dir_1.
Since you are using TortoiseSVN:
Go into Child_Dir_1, select GrandChild_Dir_1 and GrandChild_Dir_2 and right click, TortoiseSVN -> Update.
That will update only those two folders.
Ignore is so that you can "ignore" ( from commit, status etc.) untracked files, files that are not checked in.
It could be that manojlds' answer is the solution for you, but I have doubts. The problem here is that those files are really part of the project. They are kind of unavoidable, and must be in sync with the rest of working copy.
Option 1 (best): Remove all configuration files form repository, or better yet have in repository only configuration template files (with, say, $ as first character in file names). Each user could copy those template files to true configuration files and change them accordingly. Configuration files should not ever be committed. Only template files should, but updating template files will not mess with current configuration files of any user.
Option 2 (second best): Ignore those configuration files. Use your own files for your own configuration, with names that don't clash with existing. You may even add your files to SVN, but you may just as well not add them. Does not matter, as long as you don't need your configuration on another machine.
Option 3: Use ignore-on-commit group. Use those configuration files that already exist. Change them to your likings, but don't ever commit them. To ensure that you don't commit them by accident flag them as non-committable (go to commit window, select all non-committable files, right click > Move to changelist > ignore-on-commit). The problem with this is your files are not protected from other users' updates, but may actually be a good thing.
Option 4: Chop the folder out (a horrible hack). Remove Child_Dir_1 from working copy (Right click on it > Update to revision > set Working depth to Exclude). Save the folder elsewhere first, because it will disappear. After that create it again, inside it checkout all subfolders (GrandChild_Dir_1 and GrandChild_Dir_2), and copy your configuration files. Now you have complete control over folder's contents, but update and commit become more complicated.
Edit: There is option 5 in theory, but I doubt it can be implemented successfully. You can try: Use NTFS hard links. Copy the whole tree with all files as hard links to existing files, except .svn folders and their contents. Original directory is used for SVN operations update, commit, add and delete, and new directory is used for editing files. From new directory delete all the files you don't need, and insert all the files you do need that are not the part of SVN. The problem here is minor extra work when deleting files from and adding them to SVN.

Resources