0

I have been struggling with Subversion for some time, thinking it was beginners problems that would go over. Though today I have been thinking through it, and realize that the problem is the way it is embedded with the client files, and that you work on the server db through these embedded files.

So I wonder if:

  1. Is it perhaps just as easy to work directly towards the repository, but that the commands are "more hidden" (not mentioned in popular books)?
  2. Are the any GUI clients that can work without these embedded files.(16Feb: Using Subversion in a way that would difficult or hard to figure out otherwise)
  3. Are there perhaps any relatives of Subversion that is "better" in this respect?

Before I used the VSS client GUI application, and it was much easier (though I do want to move on to something more modern). To take an example I have a Drupal installation where most of the files are third party files that I need to keep track of. To get started I needed to check everything in and then out. Most changes are new versions from the Drupal project. (I know there are scripts to handle third party code, but I still think it must be cumbersome, especially when this code is spread in several directories).

Another thing I often has done in the past is to have the same source files in several VSS databases. (16feb:Which would be difficult in Subversion because the embedded .svn directories refers to one directory)

**13 Feb ** Seems some people don't quite understand, so: The main problem is if you do a lot of changes without using the svn commands, especially when you replace directories as when you replace 3d party code, since then you loose the .svn directories.

If you plan ahead you can use svn_load_dirs.pl as described in http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html Though what I want is to be able o do arbitrary things with my files, and then diff and commit towards the repository. I can't see how to do this with tortoise or svn commands.

16Feb: Another problem that I think many people are running into when they start with Subversion is if you don't want to do the "initial checkout" - say you want to do changes on a production site.

Olav
  • 1,758
  • 4
  • 27
  • 49
  • 1
    Those .svn files are important/vital for SVN to understand what changes are happening. What exactly is your problem that that is making you struggle? – Dan McGrath Feb 06 '10 at 22:47
  • 3
    I can't really understand what your question or problem is. What do you mean by "client files"? "Embedded files"? These are not part of the Subversion terminology. – JesperE Feb 06 '10 at 22:48
  • 1
    Note that one of the many advantages SVN has over VSS is that it _doesn't_ let you work on the server's filesystem directly. This approach ensures that each commit operation is atomic, and reduces the risk of corrupting the server's repository (as it happens in VSS from time to time). – Eli Acherkan Feb 06 '10 at 22:58
  • "client files" is usually called "working copy" I guess. "embedded files" are the .svn directories >"What exactly is your problem that that is making you struggle" If you replace directory sub-trees (and loose the .svn files, it is quite difficult to get stuff in order. – Olav Feb 06 '10 at 23:04
  • 1
    Perhaps there is a misunderstanding how Subversion works and how it is intended to use. – Andreas Kraft Feb 06 '10 at 23:41
  • >Perhaps there is a misunderstanding < - Please explain – Olav Feb 13 '10 at 21:11
  • What is your question? What is an "embedded file"? Please explain the problem more/better. – Lasse V. Karlsen Feb 13 '10 at 21:30
  • Embedded is explained in an earlier comment – Olav Feb 15 '10 at 12:42

9 Answers9

2

I've used CVS for a while, tired of it and wanted something better. I've started to use SVN but then discovered Bazaar. It's the best tool for both beginners and advanced users with both great GUI and command line. It supports many different workflows and you can use it with or without a server, alone or in a command. It's fast, cross platform, integrates with launchpad code hosting, supports subversion repositories and tons of other features and plugins. It's used by Ubuntu, MySQL, Emacs and many others. Bazaar is a free and open source software by Canonical, and a part of the GNU Project. For more details see "Why Switch to Bazaar?" and Bazaar home page.

Ilia K.
  • 4,822
  • 2
  • 22
  • 19
  • From http://fourkitchens.com/blog/2009/01/17/quick-dirty-version-control it seems to be "better" (only .svn type embedded files in the root directory). But I would guess you can't work that way towards a Subveersion repository (I want to stick to Subversion or something very close in case I will work with others in the future) – Olav Feb 16 '10 at 09:17
  • In particular, if you are forced by circumstances to use SVN, Bazaar can be used as a great SVN client! – clacke Aug 19 '10 at 11:48
1

SVN consists of two parts:

  • the repository - server's side
  • the working copy - part of repository copied to your local machine

Part of svn operations are server side operations, others are operating on working copy. Normally, server side commands operate repository's URL and local (working copy) commands take a local path as an argument.

You don't mandatory need a working copy, to perform server side operations, as: - browse repository - view log history - preview individual files or folders - diff branches - preview properties - etc.

you can use either svn command line client or any SVN GUI client - Tortoise Svn http://tortoisesvn.tigris.org/ is the most popular one for Windows - to perform both server side and client side operations.

given your repository URL is http://yoursvnserver/repo, the commands would look like:

Moisei
  • 1,162
  • 13
  • 30
1

If you try to do these 'arbitrary things' from Visual Studio you could use AnkhSVN (VS integration like VSS) or VisualSVN (Uses TortoiseSVN for most repository operation and adds its own features in VS on top of that).

See AnkhSVN vs VisualSVN and AnkhSVN versus VisualSVN. (Looks like a duplicate answer to me)

Added later Which would you rather use: VisualSVN or AnkhSVN?.

Community
  • 1
  • 1
Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
1

I would recommend using Git, Bazaar, or another VCS which doesn't require you to tell it when you move sources around. I know Git best, so I'll say regarding it that you don't need to tell it when you've moved files and you don't need to maintain VCS-specific directories in each of your own directory. There are lots of complicated things you can do, but you don't have to expose yourself to the complicated bits :).

Andrew Aylett
  • 39,182
  • 5
  • 68
  • 95
0

If you use Subversion 1.7, there is only one .svn directory in the top working directory, rather than having them spread out in all the subdirectories. This makes Subversion more similar to git and others, and may make it easier for you to move things around in the subdirectories.

clacke
  • 7,688
  • 6
  • 46
  • 48
0

If you are tied to using Subversion, then Bazaar (bzr) is actually great as a Subversion client. For your particular problem, it has a command that may be useful: bzr mv --auto, which tries to track changes even as you move things around manually.

If you have the choice to use whatever tool you like, git handles renames well, identifying renames automatically if you just do git add -A, which adds any new files and removes any removed files since last check-in.

clacke
  • 7,688
  • 6
  • 46
  • 48
0

I am not completely sure that I understand your question, but if it is client gui tools for Subversion you need, have a look at Tortoise Svn http://tortoisesvn.tigris.org/

Luhmann
  • 3,860
  • 26
  • 33
  • As far as i can see you can't for example do a diff or check in (commit) without having those .svn directories. – Olav Feb 07 '10 at 18:58
  • Can you elaborate why the .svn directories are causing you problems? – Luhmann Feb 07 '10 at 20:35
  • The main problem is if you replace directory subtrees, this is often called "vendor branch" http://drupal.org/node/679650, http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html (Its the "scripts to handle third party code" in the question). – Olav Feb 08 '10 at 08:13
  • I have a checked-out copy of my vendor branch - when a new update is released, I just copy the files over. It doesn't delete the .svn files, just copying those that have changed. Every few versions I scrap the lot and import the latest version again to ensure files that have been deleted from the vendor are deleted in my copy. – Andy Shellam Feb 16 '10 at 11:11
  • If I don't need to make changes to the source code (which is true for 95% of my vendor libraries) then with every new version I just do a straight import into /tags/vendor-lib-1.0.0, replacing 1.0.0 with the actual version number, then the app that needs it can reference the correct tag in an svn:external definition. I don't even need a separate checkout then so you don't have to worry about .svn folders. – Andy Shellam Feb 16 '10 at 11:12
0

SVN is a different beast in the sense how working copy relates to the 'server'. Here is how I would group some revision systems in this perspective in order of reliance on the 'server':

  1. TFS, Perforce
  2. SVN, CVS
  3. Mercurial, Git
mtmk
  • 6,176
  • 27
  • 32
0

Seems using the --force option with add can resolve most issues.

If .svn files are lost I think the best solution is to put them back (from the repository for example), but I haven't found discussion on or script-support for this technique.

Olav
  • 1,758
  • 4
  • 27
  • 49