I started to work on a project without setting it up for SVN .I am using Visual studio 2008 and AnkhSVN. Now I have new copy of code on my local and SVN has older copy.How should I checkout those files and commit them?
Thanks
The easiest is probably with the command line client (or TortoiseSvn with similar options). You're looking to do a checkout with the force flag on:
svn co --force <URL> <WC>
From the help:
If --force is used, unversioned obstructing paths in the working
copy destination do not automatically cause the check out to fail.
If the obstructing path is the same type (file or directory) as the
corresponding path in the repository it becomes versioned but its
contents are left 'as-is' in the working copy. This means that an
obstructing directory's unversioned children may also obstruct and
become versioned. For files, any content differences between the
obstruction and the repository are treated like a local modification
to the working copy. All properties from the repository are applied
to the obstructing path.
Related
I ran the command tfpt unshelve /migrate /source:$/Dev/MyBranch /target:$/Main from the root project folder containing all branches, taking care to undo all pending changes—both included and excluded—in the source and target branches first. As expected I saw a dialog asking me to select a shelveset, then a rundown of files from the selected shelveset in my VS Developer Command Prompt:
edit: file1.js
edit: file2.js
add: file3.js
add: file4.js
add: file5.html
edit: file6.css
...
The strange thing was that the files merged back into my source branch (Dev\MyBranch) rather than into my target branch (Main). After a tfpt unshelve /undo of the desired shelveset I tried switching the paths for the target and source branches, i.e. tfpt unshelve /migrate /source:$/Main /target:$/Dev/MyBranch but it had the same result. I also tried running the command from \Dev\MyBranch and \Main instead of the root project folder but no matter what I did the shelveset always merged into the dev branch I originally shelved it from. I wasn't able to find any other cases of this issue by searching and I'm not sure what else to try.
From my test in TFS 2015, after running tfpt unshelve /migrate command, the shelvesets will be added to the target path. Please check my command:
I have a project in VS2010 and that project exists in SVN through AnkhSVN.
I want to create a project with the same code as the existing project. I don't want to branch. Has to be a completely different project, but I want to start with the existing files from an existing project. I do not want the name from the current project listed anywhere in the existing project.
How do I do this?
Thanks for your help.
There is no specific operation in SVN as branching, all operations (tagging, branching) are just essentially making copies within SVN repository (however on SVN server these are not separate copies, i.e. you are not doubling space on server side, but instead the cost is almost nothing). So, all you need is just copy it to another location and start working there:
$ svn copy svn://host.example.com/repos/project/trunk \
svn://host.example.com/repos/new_project/trunk \
-m "Creating a new_project based on project"
After that, you probably would want to switch local working copy to point to the new_project location on the repository:
$ svn svn switch svn://host.example.com/repos/new_project/trunk .
I am using the svn:ignore property for the first time, so I may be misunderstanding something.
I am working on an iOS application. I have an Xcode project and I want to ignore the xcuserdata folder. Using the Mac Terminal application, I go to the root of my svn repository and try to ignore the folder using:
svn propset svn:ignore path/to/my/folder/MyProject.xcodeproj/xcuserdata .
If I check the svn:ignore property using:
svn propedit svn:ignore .
I see:
path/to/my/folder/MyProject.xcodeproj/xcuserdatata
I have committed and updated, but I do an svn status, I still see the folder with a ? mark beside it. Does anyone know what I'm doing wrong? I am using svn version 1.6.17 (r1128011).
Edited to add that my question seems similar to this one: SVN just won't ignore a folder, despite propset svn:ignore, but in my case none of the files in the folder I want to ignore seem to be added to svn, nor is the folder that I want to ignore added to svn.
I think you want:
svn propset svn:ignore xcuserdata path/to/my/folder/MyProject.xcodeproj
ie you want to ignore xcuserdata at the path.
There are a couple of ways to fix this globally. One is to edit subversion's config file located at ~/.subversion/config. Look for the line for global-ignores, uncomment it and change it to xcuserdata, like this
global-ignores = xcuserdata
Save that and svn status will no longer report xcuserdata folders. That makes the change on your local machine and it will only affect you. To make it on the repository itself so that it affects everybody, navigate to the root of your source tree and use the global-ignores property, like this
svn propset svn:global-ignores xcuserdata .
Then commit the change to make it active.
My team created a project. This project has already existed on each PC of each member. Now, I have just added this project to SVN using AnkhSVN. So I want to know how to each memeber of my team can use this project without check out or download this project because it has already existed. I want to using any SVN client to refer to it or something like that. Any idea for me ?
Short answer: they have to use SVN checkout into empty folders, sorry.
Ask your team members to:
create new folder named "fromsvn",
make an SVN checkout of project into that folder,
copy with replace existing project into "fromsvn" folder,
commit changes if there are any.
Long answer:
During checkout SVN creates folder named ".svn" in each folder. This ".svn" folder contains the so-called "base" versions of your files. Each "base" version is a copy of the original file which is inside SVN.
When you make "clean" checkout (i.e. you download project from server into empty folder using SVN client), SVN creates both "base" versions of files (and puts them into .svn folder) and "working copy" - the ones you actually will modify and then commit. Thus, if you checkout 10Mbytes project, SVN will create 20Mbytes of files, half of which will be stored in ".svn" folder, but it will download only 10Mbytes from server.
Other members already have their projects, but they do not have ".svn" folders. It means, that SVN client still have to download those folders from SVN server repository, and it will still cost those 10Mbytes.
I am trying to upload a solution with multiple projects but only the first project gets uploaded. When I try to load any of the others I get error "Project cannot be added to Subversion because it is out of working copy"
The folder structure on the drive is:
c:\myprojects\thisproject\project1
c:\myprojects\thisproject\project2
c:\myprojects\thisproject\project3
How do I remove a solution from the SVN library via VisualSVN? I don't see a remove solution, just add a solution.
I don't believe it's possible to remove a solution from SVN via VisualSvn. The options are either delete or export and only delete can be done, but that also removes the file from the solution and in most cases from the harddrive. VisualSvn offers minimal SVN features: update, commit, delete and branch commands.
I recommend if you are having problems with svn that you used Export from TortoiseSVN. Export removes all the .SVN folders from your solution and copies them to a new location.
If project1 is the root of your subversion repository, project2 or project3 will not add to your subversion repository.