How to Add VS2010 Project to Google Code SVN using AnkhSVN? - visual-studio

Hi I need to add the source files in my following project to Google Code SVN.
http://code.google.com/p/tnliveplaya/
I have installed AnkhSVN in visual studio 2010 and tried the "Add Solution to Subversion" but i dont have a clue on what to specify as the repo URL etc or any other necessary steps as this is my first time using Subversion or a subversion client. I referred the Google Code getting started guide too but that didnt help.
Please help if you know how to add a VS2010 solution to google code via AnkhSVN. :(

Subversion is pretty straight forward. You may want to read up on svn repository layout
Your repository has been set up with a solid layout with branches, tags, and a trunk directories.
Add your project to the trunk using this for your repository URL:
http://tnliveplaya.googlecode.com/svn/trunk
Profide your google code credentials.
Then you'll be shown a list of files that will be added. AnkhSVN is pretty smart at automatically ignoring files that shouldn't be checked in including items that change every build (e.g. obj and bin directories) or personal user settings (e.g. files ending with .user).
You can safely accept the defaults, changing them later if you wish. Read about svn:ignore.
It may take a while to commit if your project is large, but you should be good.

Related

How to change SVN source control repository - Visual Studio 2013

This is a very simple question - How can I remove Source Control from my solution and projects in order to change the SVN repository ?
I have an old project linked to an old repository, trying to move to a new one, and unable to figure out how.
The Actual place in Visual Studio that suppose to enable this is Grayed out.
Removing the .svn files form the folder doesn't apply as they are not there....
using the latest version of ankhSVN.
In your Visual2013. Go--> Tool----> Optioins--->sourcesControl
And Cuurent Sources Plug in None.
just set This. if not retuen feedback...
You seem to want to change the SVN respository that you're pointing to. There is another Question And Answer, but it seems pretty ugly.
Having installed the latest version of ankhSVN on Visual Studio 2013, it seems pretty trivial to relocate to a different SVN respository.
Right click on the Solution -> Subversion -> Switch Solution
On the menu, you should have an entry pointing to the current location of the solution. If the repository is the same, but under a different URL e.g. changing hostname, directory, etc, then simply change the relevant pieces in the URL and hit enter.
It will prompt you that the root you've specified is different from the one that you're currently using and you can simply relocate it from one to the other - i.e. choose to relocate. It will then prompt you a second time to switch, but this should be a free change.
If the new repository is different to the old one i.e. it's somewhere completely different in a different repository with a different repository ID then you're going to have to do some form of manual changing by following the instructions on the other answer.
If you want to remove the svn metadata for the project, it's in a single directory called .svn at the root of the solution that was checked out from subversion, as well as removing the information in the .sln file that mentions AnkhSVN (it's probably the only entries mentioned in a specific GlobalSection in the file mentioning source control). That purges all the svn data from the solution.

Add solution or selected project to SVN

I haven't used SVN for quite awhile and now I need to add my project/solution to SVN in order to keep track of changes.
When I right click on the solution node in Visual Studio 2013, there are 2 options for me:
Add soluction to SVN
Add selected project to SVN.
My initial thought was I'd like to add all things under this solution to SVN, so I chose option 1.
But since then, I found that only the Visual Studio solution file has a SVN enabled tick in font of it, but for the rest of other files(.proj, .js, .cs, .html, .css etc.) they have no SVN enabled tick/icon/whatever the name is in front of them. So I guess they are not added into the SVN repository.
So my question is: what is the proper way to add my entire solution(not just solution file) into SVN?
Thank you.
Option 1 will work when there's a common root. This means a structure like:
Path\foo.sln
Path\project\project.csproj
Path\project\image.jpg
When there's no common root, it cannot be automatically created right now.

AnkhSVN see recent change

I have just installed AnkhSVN, and it works great, I just have one question. If someone else in the project commits a change to a file, is there anyway for me to see this WITHOUT updating the project? If I change something a small red box shows up on that file in Solution Explorer, is there any way to get something like that when a file on the SVN is n newer version that on my local copy? In case that doesn't work. Is there anyway to see all changes that was made since last I updated. So I can keep track on whats going on in the project?
There's a tab called 'Recent Changes' in the 'Pending Changes' window that facilitates just that. See also http://ankhsvntips.net/post/1478971385/recent-changes-auto-refresh
I would recommend using a Google Code project. This way, you can easily keep track of any update or member of the project directly on the project's Google site.
Setting up a Google Code project is easy and pretty straight-forward. Since you already have AnkhSVN on Visual Studio, the only thing would be to link the Google Code project to your local project.
You can follow this as a guide : Google Code project using Visual Studio and AnkhSVN

SVN: Colleague checked in a folder into repository, but I can't Update my version to it

In showing a colleague how to use SVN yesterday, we created a test folder and file within our existing Visual Studio Solution. We'll call it "Test" folder with two files, "Test.ascx" and "Test.ascx.cs". We added it (or Visual SVN added it, 'cos it's awesome), and committed it. We also added and committed other files elsewhere in the project.
We can see it in the repository (and the other files).
Doing an update on my own machine to pull down these new files resulted in the other files being pulled down correctly, BUT the Test folder does not appear. No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
Where am I going wrong?
This is a known problem.
You can use
$ svn update --depth=infinity
to force the update. With TortoiseSVN, use the "Update to revision" command in the Submenu, then change the depth combobox to "fully recursive".
I've had ghost errors like this before and found the easiest work around is to delete the parent folder and update it's parent:
Project Root
Project
NewFolder
Delete Project, then Update Project Root
We can see it in the repository (and the other files).
...
No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
So you can or cannot see it in the repository browser?
Did you commit and update the parent folder of your Test folder?
I don't know, svn is always telling me to clean, did you try that?
It's not an answer, I know, but I have tried all the solutions you guys have kindly suggested and I just end up with conflicts, crashed TortoiseSVN and built up Karma. Therefore, a trusty edit in the .svn/entries file sorted it.
I have until now been a single developer using SVN just to manage my source code. Other people don't have problems, and I just check in stuff. I use Visual SVN as a layer to frig SVN for .NET (which it isn't great with) and I seem to constantly run into issues. I am performing very simple operations, not even branching/tagging. Simple simple simple. And yet I have issues with it?

Visual Source Safe - Removing files from web projects

I'll try to make this as straight forward as possible.
Currently our team has a VSS database where our projects are stored.
Developers grab the code and place on their localhost machine and develop locally.
Designated developer grabs latest version and pushes to development server.
The problem is, when a file is removed from the project (by deleting it in VS2008) then the next time another developer (not the one who deleted it) checks in, it prompts them to check in those deleted files because they still have a copy on their local machine.
Is there a way around this? To have VSS instruct the client machine to remove these files and not prompt them to check back in? What is the preferred approach for this?
Edit Note(s):
I agree SVN is better than VSS
I agree Web Application project is better than Web Site project
Problem: This same thing happens with files which are removed from class libraries.
You number one way around this is to stop using web site projects. Web Site Projects cause visual studio to automatically add anything it finds in the project path to the project.
Instead, move to Web Application Projects which don't have this behavior problem.
Web Site projects are good for single person developments.
UPDATE:
VB shops from the days gone past had similiar issues in that whatever they had installed affected the build process. You might take a page from their playbook and have a "clean" build machine. Prior to doing a deployment you would delete all of the project folders, then do a get latest. This way you would be sure that the only thing deployed is what you have in source control.
Incidentally, this is also how the TFS Build server works. It deletes the workspace, then creates a new one and downloads the necessary project files.
Further, you might consider using something like Cruise Control to handle builds.
Maybe the dev should take care to only check in or add things that they have been working on. Its kind of sloppy if they are adding things that they were not even using.
Your best solution would be to switch to a better version control system, like SVN.
At my job we recently acquired a project from an outsourcing company who did use VSS as their version control. We were able to import all of the change history into SVN from VSS, and get up and running pretty quickly with SVN at that point.
And with SVN, you can set up ignores for files and folders, so the files in your web projects dont get put into SVN and the ignore attributes are checked out onto each developer's machine
I believe we used VSSMigrate to do the migration to SVN http://www.poweradmin.com/sourcecode/vssmigrate.aspx
VSS is an awful versioning system and you should switch to SVN but that's got nothing to do with the crux of the problem. The project file contains references to what files are actually part of the project. If the visual studio project isn't checked in along with the changes to it, theres no way for any other developer to be fully updated hence queries to delete files when they grab the latest from VSS. From there you've got multiple choices...
Make the vbproj part of the repository. Any project level changes will be part of the commit and other developers can be notified. Problem here is it's also going to be on the dev server. Ideally you could use near the same process to deploy to dev as you would to deploy as release. This leads into the other way...
SVN gives you hooks for almost all major events, where hooks are literally just a properly named batch file / exe. For your purposes, you could use a post-commit hook to push the appropriate files, say via ftp, to the server on every commit. File problems solved, and more importantly closer towards the concept of continuous integration.
Something you may want to consider doing:
Get Latest (Recursive)
Check In ...
Its a manual process, but it may give you the desired result, plus if VS talks about deleted files, you know they should be deleted from the local machine in step 1.

Resources