Showing posts with label Subversion. Show all posts
Showing posts with label Subversion. Show all posts

Wednesday, June 15, 2011

Useful SVN commands

svn add
svn add - Add files and directories to your working copy and schedule them for addition to the repository. They will be uploaded and added to the repository on your next commit.
svn add --non-recursive testDir - You can add a directory without adding its contents 
svn add * --force - If you want to add every unversioned object in your working copy
svn update 
svn up | svn update - Update your working copy.
svn up -r8000 update your working copy to an older revision (revision 8000)
svn checkout
svn co | svn checkout -  Check out a working copy from a repository.
svn delete
svn del | svn delete - Delete an item from a working copy or the repository.
svn del testDir
svn mkdir
svn mkdir - Create a new directory under version control.
svn mkdir testDir
svn commit
svn ci | svn commit - Send changes from your working copy to the repository.
svn ci -m "Added new functionality."


Read more: Kasun's Blog

Wednesday, May 18, 2011

SVN и Dropbox - резервирование исходного кода

Backup исходного кода это очень полезное занятие. Я не люблю когда на машине установлена куча программного обеспечения. Поэтому на домашнем ПК у меня есть виртуальна машина, внутри которой настроен SVN, Continuous Integration и другой набор софта, который можно вынести на другую машину.
Далее я покажу как синхронизировать репозитории с dropbox-ом.
Используемое программное обеспечение:

1. SVN - RocketSVN;
2. Dropbox client;
3. 7-Zip;

RocketSVN по умолчанию хранит репозитории по следующему пути: "C:\Axosoft\RocketSvn\Repositories".
Для работы 7-Zip из командной строки добавим 7-ZIP в переменную Path операционной системы.
Далее создаем простой batch script:

mkdir C:\Temp\%1
svnadmin hotcopy C:\Axosoft\RocketSvn\Repositories\%1 C:\Temp\%1
7z a C:\Temp\%1.zip C:\Temp\%1*
copy C:\Temp\%1.zip "C:\Users\lubushyn\Dropbox\Projects\%1.zip"
del C:\Temp\%1.zip
attrib -r C:\Temp\%1\format
attrib -r C:\Temp\%1\db\format
del /q /s C:\Temp\%1\*.*
rd /q /s C:\Temp\%1

Read more: .NET Notes

Tuesday, May 03, 2011

The Subversion Mistake

At my workplace, when I first got here, we were doing the waterfall method of development. We would do 3 months worth of hard work, with thousands of commits and tons of features. Then we would hand things off to QA to test. Spend a few more weeks bug fixing. Then when things were 'certified' by QA, we would spend a whole weekend (and the next week) doing the release and bug fixing in production. Then the cycle would repeat again. Ugly.

Now, based on feedback I gave, we use an iterative approach to development. It is extremely flexible and has allowed us to increase the rate of releases to our customers as well as the stability of our production environment. We did about 9 iteration releases in 3 months, our customers got features more quickly and we have fewer mid-week critical bug fixing patches. Everyone from the developers all the way up to the marketing department loves that we have become more agile as a company.
In order to support this model of development, we had to change the way we use subversion. Before, we would have a branch for the version in production and do all of our main work on trunk. We would then copy any bug fixes to that branch and do a release from there. I reversed and expanded that model.
  • Trunk is now what is in production.
  • Main development and bug fixes happen on numbered iteration branches (iteration-001, iteration-002, etc.)
  • Features happen on branches named after the feature. (foobranch, barbranch, etc)
  • Each iteration branch is based off of the previous iteration. If a checkin happens in iteration-001, it is merged into iteration-002. (ex: cd iteration-002; svn merge ^/branches/iteration-001 .)
  • No commits happen directly to trunk, only merges. For midweek releases, we cherry pick individual commits from an iteration branch to trunk. (ex: cd trunk; svn merge -c23423 ^/branches/iteration-001 .)
  • Feature branches are based off of an iteration.
Unfortunately, we are quickly learning that subversion does not support this model of development at all and I've had to become a subversion merge expert.

uberSVN

frontpage_bg.jpg

uberSVN turns Subversion into a complete, open platform for ALM with an integrated social coding environment.

Read more: uberSVN

Wednesday, April 27, 2011

SwitchSvnVersion

SwitchSvnVersion created by Steve Dunn.
A command-line tool to modify Visual Studio projects.  You can use to change the target platforms and target .NET Frameworks.  You can also use it to target different versions of Visual Studio, e.g. from 2008 to 2010.
Released by Steve under the WTFPL license: http://sam.zoy.org/wtfpl/COPYING
Read more: GitHub

Friday, March 04, 2011

Subversion v1.6.16

Subversion Download: WANdisco's certified Apache Subversion open source software is a complete, fully tested version of Subversion based on the most recent, stable release, including the latest fixes. The software is backed by our dedicated team of Subversion development, QA and support professionals focused exclusively on delivering the highest quality version of the software. Our developers have been involved in the Subversion open source project since its inception and have the status within the community to make changes to Subversion's code base. This ensures fast delivery of fixes and enhancements. The team is led by Hyrum Wright, WANdisco’s Director of Open Source. Hyrum is president of the Subversion Corporation and has been the release manager for Subversion since early 2008

Version 1.6.12
- BUG: hook scripts could fail due to an invalid CWD parameter
      passed to the CreateProcess API. (Stefan)

Version 1.6.11
- BUG: Using spelling dictionaries in utf8 could crash
      the commit dialog. (Stefan)
- BUG: Dialogs could hang if they were closed if the
      modeless log dialog was still open. (Stefan)
- BUG: When checking an added file in the commit dialog,
      the parent folder wasn't checked automatically if
      it was added too. (Stefan)
- BUG: when passing /tourl: to the merge command, the
      revision range page was shown instead of
      the tree page. (Stefan)

Version 1.6.10
- BUG: Updating single items from the check-for-modifications
      dialog could lead to inconsistent working copies. (Stefan)
- BUG: Adding a file in an unversioned folder from the commit
      dialog only marked the file as added. (Stefan)
- BUG: The overlays didn't work on win2k up to XP SP2. (Stefan)
- BUG: The 'browse' button (...) in various dialogs did nothing
      when a file:/// url was specified. (Stefan)

Read more: Subversion v1.6.16

Monday, February 28, 2011

Advantages of git over Subversion (SVN): A Brief Summary

I've been using SVN for years. And git is continuously popping out in front of me. I thought that I need to learn more about it. After reading an article over here (http://bit.ly/why-you-should-switch-from-svn-to-git) I wanted it to be summarized to make it understandable "briefly" in a short time!
Please do not forget that these are only the advantages. I willfully didn't tell about the disadvantages.

Major Advantages:

  • Backup: Files are stored on each committer's own storage. Along with all of the details like commit logs etc.
  • Work Offline: Use your own computer as a git repository then if you want, you can synchronize it with other developers easily.
  • Small: 20x smaller than SVN repositories. For details click here.
  • Fast: You can get an entire git repository at the same time of a SVN checkout from a SVN repository. For details click here.
  • Flexible: You can implement whatever workflow you want even an SVN workflow. For details you know you should click here.
Other Advantages:
  • Synchronize: You can synchronize (push/pull) changes in every direction. Even you can use it as a deployment mechanism via a 'push' command as can be seen in Heroku deployments.

Read more: Inanc Gumus

Sunday, February 20, 2011

Subversion and Monodevelo

The nice thing about Monodevelop is that it has built in support for subversion. The bad thing is that getting that really to work is a real PITA. There is no documentation at all how to set up a Subversion repository and having MonoDevelop (for Mac)communicate without completely crashing over and over again. This is my public cheatsheet.
The scenario: I have Windows based network centered around a Server 2008. This server has redundant storage and is backed up on a regular scale. For building iPhone apps I have my Macbook. Anything could happen to that, like getting nicked. To preserve my work my Windows server runs VisualSVN server. Nice and easy tool, it takes two clicks and typing a name to set up a new repository. My work is safe, I have a good history and can share it with (potential) co-workers.
The hard part is linking this repository to a MonoDevelop project. There is no guidance and any error in the url or credentials will crash the complete IDE. The error log on that is not really helpful.

Read more: CodeBetter

VsTortoise - a TortoiseSVN add-in for Microsoft Visual Studio

News
17th Feb 2011: VsTortoise Build 29 Beta released. Please see download and changelog for details.
27th Sep 2010: VsTortoise Build 28 Beta released.
7th July 2010: VsTortoise Build 27 stable released.

Project Description
VsTortoise is an add-in for Microsoft Visual Studio 2005/2008/2010RC standard and higher editions, that provides an interface to perform the most common revision control operations directly from inside the IDE. It uses TortoiseSVN to execute the Subversion commands. Every command can be binded to a shortcut inside the IDE. You can, of course, still perform every TortoiseSVN command from the Windows Explorer.
VsTortoise does not register as source control provider in the IDE and will not interfere (eg displaying a “check-out” etc dialog) when editing a document.

Read more: Codeplex

Thursday, February 03, 2011

SVN (subversion) for windows tip

For those of you who use SVN (subversion) for windows and TortoiseSVN as your 100% free source control solution with a Microsoft visual studio environment I have a small tip that may save you some time.

When you want to commit in code you get all the files that were modified, added or deleted.
As you compile a project, many output files that are not truly source control files are created. These include the bin, obj, debug, and release files.

For example, when I added a new project and wanted to commit it in I got the following:
As you can see, although not marked by default, I got irrelevant files which I will encounter over and over again each time I will want to commit in code or check for modifications.
One option you have to is to right click the irrelevant files and then add them to your ignore list.
The problem with this - is that each time something changes in your project files or your TortoiseSVN settings were lost for some reason (finally got that new fancy laptop the boss promised you...) you'll have to do this again.

Instead, you have the very nice option to go to your source code repository main root, right click somewhere inside the folder and then click on the TortoiseSVN --> Properties sub menu item .
Then you will get the following screen:

PropertiesScreen3.jpg

Read more: Benjamin Bondi

Monday, January 31, 2011

RocketSVN fly's to freedom. RocketSVN Server/RocketSVN for VS now free (as in free) and open sourced too!

image%5B13%5D.png?imgmax=800

I’m excited to announce that we have decided to make both RocketSVN Server (Subversion Server for Windows) and RocketSVN for VS (SVN add-in for VS) 100% free. Indefinitely. For unlimited users
While we have been doing great additions to both open source projects (Ankh and Subversion), we decided it was important not to charge for the work we’ve done. We’re also happy to make the RocketSVN Server source code available on Google Code: http://code.google.com/p/rocket-svn-server/

Read more: Greg's Cool [Insert Clever Name] of the Day
Read more: RocketSVN Server and RocketSVN for VS Now Free

Thursday, January 27, 2011

Migrate SVN To TFS 2010

For all the SVN users that likes to migrate to TFS 2010 with all the history of SVN here is the right tool for you:

http://svn2tfs.codeplex.com/

This tool will help to Migrates a SubVersion 6.x (SVN) repository to Team Foundation Server (TFS) 2010 replaying every action occurred in SubVersion.

svn2tfs_1_2_beta_20101001_thumb_2D8B6B59.png

Read more: Eran Ruso

Wednesday, January 19, 2011

TFS Guide for Subversion Users

Moving from one source control system to another is much like moving to a new town.  You spend time finding where to get the same services in the new town, discovers what’s different, what’s new, and what is not available.   In this blog post I’ll take a similar approach to explore what it is like to move from Subversion town to TFS town.  I’ll use SVN terminology where it makes sense so you can quickly find TFS equivalent terms.

The TFS way to do a given Subversion Task

Importing Code
Subversion has an import command to add files and folders to an SVN repository.  Once a folder structure is created, files and folders can be added using svn add.  TFS does not have a separate import and add operation – instead it is all done with the tf add command.  TFS does require a workspace (think working copy directory mapping) to be defined to map local folders to server folders.  In Visual Studio the workspace is created automatically for you if you drag and drop files onto Source Control Explorer or if you add an existing solution to Source Control.  
To do this from the command line in TFS you do the following:
  1. cd into the top level folder you want to add
  2. Create a workspace - tf workspace /new
  3. Select the server path you want to add the folder to in the dialog
  4. Press OK
  5. Pend the add of the folder and it’s contents recursively by performing the following command.  tf add .\ /r
  6. tf checkin
SVN Checkout and TFS Checkout are NOT the Same
One area of confusion for users moving from SVN is the term checkout.  SVN checkout is the way to pull files and folders from the SVN repository to create a working copy locally.  You typically only do this once and when you want later revisions you run svn update.   The TFS equivalent of SVN checkout is creating a workspace mapping and performing a tf get which will copy the files from the server into the local files you defined in the workspace.

A TFS checkout is completely different than the SVN checkout command.  TFS checkout is the way the user tells TFS they plan to make a change to a file.   TFS checkout changes the file’s attributes from read-only to writable.

SVN Update

The update command is used to get the latest or a specific revision from the SVN repository to the working copy.  The TFS get command accomplishes the same thing.   However, there are a few key differences on behavior.
  1. SVN will look for missing files and place them in the working copy.  TFS does not do this.
  2. SVN pulls down an extra copy of the file and places it in the .svn directory.  TFS does not pull down an extra copy which means the space on disk that a TFS workspace takes is at least 1/2 the space that SVN uses.
  3. SVN pulls down files as writable while TFS pulls down files that are not checked out as read-only
SVN Commit

SVN commit (aka ci) is the equivalent of tfs checkin.  Where they differ is
tfs checkin has many additional features (see New Things you can do in TFS section below)
After the checkin tfs makes the file read only while svn leaves the file writable

Read more: Ed Hintz (MSFT)

Sunday, January 16, 2011

MSAccess SVN

Project Description

Access SVN adds to Microsoft Access (MS Access) support for SVN Source control

What is MS Access SVN

MS Access SVN its a tool to integrate MS Access solutions with svn source control.
An MS Access solution is compound by any of the following components:

  • VBA code in modules and classes
  • Forms: design and VBA code
  • Reports: design and VBA code
  • Queries: Query definition. Only for mdb files
  • Macros
  • Access Pages
  • Tables: only for mdb file format
  • Database properties
  • Database properties, including startup form options
  • Table relations: only for mdb files
  • References: References to other libraries or MS Access files

MS Access SVN will support the following file formats
  • mdb: Classic file format
  • adp: Access projects: in this files, queries and tables are stored in a sql server database, wich has tools enought to export and create sql scripts.
  • accdb: New file format for Access 2007 and following

Read more: Codeplex

Tuesday, January 04, 2011

Apache Subversion To WANdisco, Inc: Get Real.

The Apache Subversion project has just had to remind one of its corporate contributors about the rules of the road. WANdisco, Inc was putting out some very odd press releases and blog posts, implying (among other things) that their company was in some sort of steering position in the open source project. Oops — that's not the Apache Way. The Apache Software Foundation has reminded them of how things work. Meanwhile, one of the founding developers of Subversion, Ben Collins-Sussman, has posted a considerably more caustic take on WANdisco's behavior.

Read more: Slashdot

Wednesday, December 22, 2010

Pitfalls and Lessons Learned when switching from SVN to GIT

This is not Git howto, it just describes where our team had trouble when starting our current project in Git.

Git is not SVN

Just forget everything you know about SVN. Start over with a fresh mind. Ok checking out and commiting are still similar, but when working with branches and tags, it's a whole new world.
Take a look at the Git cheatsheet: https://Git.wiki.kernel.org/index.php/GitCheatSheet
Don't get confused by the many commands, you'll get there. Starting Git is not that complicated.

Play around

You don't need much give Git a spin. Install it, work with it in a local repository. There is plenty of information out which will show you how to do so. Try everything you need to do in your daily work life. Merge, branch, tag .....
The only important thing is: work on the command line. After you got everything figured out you can use your IDE as an aide.

Watch out, branches

Here's the first thing i stumbled on. I was working on two branches, both not too different. Let's call the brA and brB.
So after creating to files in brA, I switch to brB to test something. I was wondering, why brB did have the same files and modifications I just did in brA.
Long story short. Never switch away from a dirty state, unless you know what you're doing.
What happened? Before switching away from brA, I had my repo in a "dirty state". That means, I had changes I did not commit to my working tree. These files will "follow" me to whereever I go.
This is actually very useful, if you want to test if a fix or change you made works in different scenarios before you commit it. But sometimes you do not want this behavior. So there are two options to avoid it. If you're sure you want the code in the branch, commit it. Otherwise stash it. There's a nice post to stashing on ariejan's site.

Read more: United Coders

Monday, December 20, 2010

Corporate Open Source Repositories You Never Knew Existed

Interesting, I just stumbled upon yet another corporate open source repository that I never knew existed. We all know about IBM and Sun's open source repositories, but what about the rest of them? Well here's a few I can remember:

Read more: Manageability

Monday, December 13, 2010

Unbind a Visual Studio 2010 Solution from Source Code Control

I was working with a solution that I got from someone else the other day.  When I loaded it up, Visual Studio 2010 informed me that it could not connect to a TFS server at some URL and will open the solution in offline mode (or something to that effect).  Of course, I have no access to this TFS server, so, I’m going to get this message every time I open this solution.  That’s going to get annoying pretty fast.

So, I had a quick search on the Internet about removing source code control from a Visual Studio 2010.  I found all sorts of information about editing the sln file, removing various sections of an sln file and what-not.  None of this information can from Microsoft.  While in theory doing this would likely do what I wanted, manually editing sln or project files never seems like a good idea.  I don’t know if there are side-effects from this that Visual Studio will telescope into some future version of the sln file and end up causing me problems.  e.g. Visual Studio 201x is released and I try to upgrade this sln file—what if this future version of VS fails or even worse, corrupts my file.

No, I didn’t want to get chicken blood on my keyboard.

I was somewhat surprised that my search didn’t immediately show something that wasn’t obvious ritualistic magic; so, I went looking in the File menu at the Source Control entry.

In there, when my solution was loaded, I simply selected Change Source Control.  As soon as I try to open that dialog VS told me again that it was working offline and wanted to know if I wanted to completely remove the Source Control bindings from my solution.  I simply chose yes and all the SCC bindings were removed from my solution.

Saving and reloading the SLN file had no source control offline message, and my keyboard is no dirtier than when I started.

Read more: Peter Ritchie's MVP Blog

Posted via email from .NET Info

Monday, December 06, 2010

Sublime

repo-folders.png

Subversion Server for Windows
Sublime is a user friendly Subversion server for Windows that makes using and managing Subversion a breeze! Sublime installs in minutes and includes a web-based interface, allowing easy access for your entire development team.

Read more: Sublime

Sunday, December 05, 2010

Setup a Subversion Server in 4 Minutes

You are going to need to type fast but I think you can do it in 4 minutes.   These are my notes on what worked for me on my Fedora core 6 with svn lib already installed by the package manager:

1. Create a Repository

svnadmin create /svnrepos

2. Create a SVN User

vi /svnrepos/conf/svnserve.conf

In that file add these three lines:
anon-access = none
auth-access = write
password-db = passwd

Create a password file:
vi /svnrepos/conf/passwd

In that file add a line for your user:

# add users in the format : user = password
tony = mypassword

3. Import Your Project

(assuming you’ve put your project files in /projects/myrailsproject)

Read more: tony spencer