I have synchronized a folder with folder in tortoise svn. Now I want to synchronize this folder with another folder in tortoise svn. How to do this. Please guide me
The mechanism in Subversion are a little bit different. You speak here from a checkout, if you work on a local copy. There are two cases here:
You want to work on a different part of the repository:
Checkout that part at a new location locally (so you are able to work in parallel on both).
Switch your current location to the new part of the repository. This will replace all files locally, and you are no longer able to work on both parts in parallel.
The first scenario is normally used. There are some cases where it may be not appropriate:
You have not enough place locally. You should change that first, because you are not able to work anyway.
You are working on a branch, and want to merge some of the changes on the branch on the trunk or another branch. Then a svn switch is the normal way to do that.
Alternatively, you may do a sparse checkout of the common parent of the two folders, and populate only the parts you are interested in.
Related
i am pretty new to GitLab and have a question concerning branches and updating the local repo.
Around two weeks ago i cloned a project and did a bit of work on it (mainly added one branch). Other people also have local repositories of that same project (hope that makes sense). Now I would like to clone only a single branch of one of those local repos made by other people and include it into my local repo.... How do i do this? Ofc I can clone the branch into a different directory, but my goal is only having one directory with only one name in which that branch is contained, so that I can switch between the branches I had from the beginning and the new branch I cloned.
Basically, in order to be more clear: There is a project called a_proj. Me and another person have cloned a_proj and therefore have local repos on which we do work. The other person added a branch called a_branch which I don't have. I want to include a_branch into my version of a_proj.
Additionally i have a different question concerning updating a branch. What if some person does some work on their local version of a branch I also have on my Local and I want to include their changes, or even change my branch to their version. How could I do that?
Thank you a lot for any helpful answers on this topic. If there is constructive critic about this post or the way I think about GitLab I am happy to hear it, as already mentioned, this is a pretty new topic to me and I want to learn wherever i can!
Okay, i figured it out. Was pretty easy actually once one knows what to do. For information, i am using GitKraken so it might be different for different environments but essentially the idea is to add the other person's project as remote, (where ones own project should also be a remote named origin). Then one can add any branch of those remotes to the Local project, simply by checking out the wanted branch. It then gets added to the Local repository on which work can be done.
I guess that isn't anything new to anybody who uses GitLab but i'll just leave it here in case some noob (Like me) also has this question.
I am wondering what happens in SVN when a file is updated directly instead of using SVN? The main reason I am asking is that there was a problem updating the SVN on my machine (windows) when the server (linux) had 2 names that were the same, but different case. I resolved this on the server, but didn't do it through SVN since it won't update correct, but I still get the issue. Do I need to run some kind of command to update it?
Thanks.
EDIT:
I deleted the comflicting file in the working direcotry and wanted to know if doing things directory in the working directory get tracked at all or what needs to be done to resync.
When SVN gets blocked because the repository is more "up to date" than the local checkout, one brain dead foolproof solution is:
Move (or remove) the files that are causing the conflict at the command line (don't use SVN tools to do this, and don't use the GUI if you have tortoise installed).
svn update the repository, which will restore the current copy of the files from the subversion server.
Decide what to do with your cached copies of the old files. Either manually merge them back into the repository, discard them, or remake the changes in the new svn managed files (depending on your needs).
Note that if you move the files into a directory using tortoise, make sure that you move it into a directory that's not associated with ANY SVN project. It's not fun trying to undo the helpful changes tortoise does in thinking your wanting a SVN move to accompany the file system move.
There is no need to run any special commands. If you updated the sources, the next time you will run svn update subversion will seamlessly merge the changes and you will get an uptodate working copy.
If you changed some files, they will appear modified or conflicted depending on the changes made by you and other users.
I have been going through documentation and such and have SVN working, but I want to put it on an existing directory. I imported that directory, so do I rename/delete the non SVN directory and then checkout the SVN to the non SVN directory location? I am just trying to understand how to get it to start posting to our website URL.
If so, is there any way to keep the current non SVN and make it SVN rather than import and overwrite?
Thanks, I am trying to understand SVN, but find a lot of the tutorials and such on the web to be confusing.
Yes, you have it exactly. Once your code has been added to the repository, you can get rid of or rename your original code directory. Then checkout the project from the repository into the same location as your previous code and continue working from there.
UPDATE
To make it so that your website is updated from the repository, you actually need two working directories, and a repository.
Repository: The repository stores the code and changesets, but isn't directly accessible as a file system. Keep a backup!.
Working directory 1: You develop and test your code from a working directory checked out from the repository. Commit changes back to the repository.
Working directory 2: Rename the code directory on your webserver. Checkout a copy of the code to your web server in its place. Technically it is now a working directory, since it contains the .svn metadata directories, though you won't usually make changes here.
Make changes to your code from your development working directory (1) and commit them back to the repository. When you are satisfied that they are working correctly and have been properly tested, on the web server's code copy (2) do svn update (or if you're using Tortoise SVN on the web server, do an update). This will synchronize the server code with the current development version.
Subversion will not automatically push updates to your web server. You will need to pull them in with an update when you need to. It is possible to use what's called a "post-commit hook" to cause Subversion to execute a script when commits are made, and that script could update or export code to your production web server. However, you would need to write the script and it's kind of an advanced usage of Subversion. I would recommend trying out the method I described with a working copy on the web server to get accustomed to the workflow befrore trying anything more complicated.
Addendum If you really want to do this (and I don't really recommend it unless you really test well) a very easy method would be to schedule a cron job that does svn update every couple of hours (or minutes) on your production site.
Don't forget that if you do happen to modify your code directly on the web server, you must commit it back to the repository from there, and do an update on your development working copy.
I want to add my project to a subversion repository. The project folder contains a symlink to a folder containing thousands of txt files that I don't need to add to the svn repository. I DO want the symlink-folder to show up when I checkout the code, however.
It looks like I can use svn addprop svn:ignore symlinked-folder to ignore the folder, but then I'll have to add that symlinked folder to every working copy I check out before everything will work.
Is there a proper way to do this?
Perhaps there is no way to deal with this, since a symlink is a filesystem artifact. Is there a better way to handle this situation?
CONCLUSION - EDIT
After all this investigation, I committed the symlink-folder by accident and SVN added it to the repository without adding any of the files within it. Upon checkout, everything works fine. The symlink-folder checked out and works.
I am using assembla to manage my SVN repository, so that might have something to do with this success.
The answers above are right, your symlink won't work if you check out the repository on windows.
But if you're aware of that and you don't care, you can add just the symlink without its contents:
svn add -N your-symlink
man svn add here
I believe you are correct, imagine if a user checked out your repo under Windows - how would SVN create the symlink when the underlying OS doesn't support it?
Is the target folder that you are symlinking to under version control? If so, you can make use of the svn-externals property.
You are right, it doesn't make sense to add a symlink to a repository. What would happen if someone checked out the source on a machine that didn't have access to the folder the symlink points to?
One way is to structure your repository so that you can check out the codebase without having to check out documents. E.g.:
Trunk
Tags
Branches
Documents
So you only check out the trunk or branch that you are working on, and when you require it you can check out the documents.
Alternatively, use a project management tool like Redmine to store your docs. It can integrate with svn as well so you can view your repository and manage permissions through it.
I get repository where main folder is folder of solution. I want create folders trunk, branches, tags, etc. This repository is on Assembla.
I'm using windows 7 and newest SVN Tortoise. Is it some simple way to reconstruct this repository ?
I'm not quite sure I understand what you want, but why not make the folders and then move the rest of the files where they belong? Sure, it will mess with the history a bit (old deleted files won't show up in the new folders), but that's rarely a problem.