1

I've been using TortoiseSVN on my development machine so far, and I find there are certain shortcomings. I use Total Commander as a file manager, and I found myself often removing or moving folders inside a workspace. Because I use standard file system operations invoked by Total Commander, and not those provided by TortoiseSVN, this often corrupts the workspace and I'm unable to commit to the repository.

Is there any free alternative, which installs driver/service to monitor the file system operations so it can correctly log these operations, thus not corrupting the workspace? Alternatively, is there a source control software which do not have these shortcomings at all?

Edit

Rename handling in SVN/Git/Mercurial

Handling renames: svn vs. git vs. mercurial
Renaming in Git and Mercurial: Accuracy and automaticity

Git handles renames completely automatically, Mercurial is able to auto-discover renames using explicit command, and SVN doesn't handle renames at all.

Another relatively important difference is that if for any reason Mercurial does not detect file rename, it stores the file in repository anyway, thus duplicating the content. Git never duplicates content regardless if it detects file rename.

Automatic rename handling for Mercurial

Here are two extensions allowing to add Git-like automatic rename handling for Mercurial:

https://bitbucket.org/jammycakes/autorename/downloads
https://bitbucket.org/cbarrett/guess-renames/downloads (source)

Comparison of Mercurial and Git

What is the Difference Between Mercurial and Git?
Git vs. Mercurial: Please Relax
The Differences Between Mercurial and Git
Google Analysis of Git and Mercurial
Git, Hg or Bzr — Which to recommend to a new user?
SCM choice for a new user?
Git, Mercurial and Bazaar – A Comparison
Git and Mercurial - Compare and Contrast
Distributed Version Control Systems (Interesting feature comparison, although quite old)

Getting started with Mercurial

Hg Init: a Mercurial tutorial
Video tutorial

Git tools

Besines the already mentioned Git Extenesions, Git Source Control Provider is really useful Visual Studio extension for Git. TortoiseGit is an alternative for Git Extensions, but according to my testings, Git Extensions is more user friendly, with neat user interface. Working with submodules in Git Extensions is also much better.

Community
  • 1
  • 1
Paya
  • 5,124
  • 4
  • 45
  • 71
  • [Here is a tutorial](http://jamesmckay.net/2010/10/perforce-merge-a-very-nice-free-replacement-for-tortoisemerge/) how to install and use Perforce P4Merge tool as a replacement for merge/diff tools packed with TortoiseHg/TortoiseGit. – Paya Jun 11 '11 at 15:31

2 Answers2

4

Another DVCS you can use is Mercurial.

https://www.mercurial-scm.org

http://tortoisehg.bitbucket.io

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
David
  • 4,185
  • 2
  • 27
  • 46
  • 1
    Although I have come to prefer git, mercurial is also a great system, and transitioning from SVN to mercurial is probably simpler than transitioning from SVN to git. I don't recall how well it handles moves and renames, though. – Aasmund Eldhuset Jun 04 '11 at 14:25
  • Never had a renaming / moving problem for my .net projects when making use of http://visualhg.codeplex.com/. I have not used mercurial for any other purpose so I can't tell if this problem arrise – David Jun 04 '11 at 14:53
  • [Here](http://stackoverflow.com/questions/5924995/mercurial-renaming-a-file-results-in-duplicate-contents-in-repository) is some info about Mercurial rename-handling. – Paya Jun 08 '11 at 11:56
1

git automatically detects files that have been moved. However, there are many other reasons to preferring git to SVN - first and foremost, git is a distributed version control system, which brings many benefits over centralized systems such as SVN. For instance, you can commit locally without having to immediately upload changes to the central repo (which means that you can commit more often (thus running a smaller risk of messing something up) because you are not required to have something that works 100% before you commit it), and working with branches is a breeze. On the downside, the learning curve is steeper than with many other source control systems, and getting used to git when coming from SVN might take a while.

If you want to try git on windows, I recommend gitextensions.

Aasmund Eldhuset
  • 37,289
  • 4
  • 68
  • 81
  • @Aasmund Eldhuset: You said it detects files. Does it mean it detects folders as well? If I move a folder in a workspace, is it actually logged as "move", or as "folder and all its content deleted + new folder created and all its content added"? – Paya Jun 04 '11 at 14:30
  • @Paja: git's approach is somewhat unusual - it doesn't have the concept of "logging a move operation". Rather, it is capable of analyzing the files that have been added and deleted within the same commit and detect whether a deleted file has reappeared somewhere else. When you ask for the `diff` of a file, you can ask it to track renames so that you will get the complete history for a file. If you move a folder, git will record it as a lot of files having been deleted and a lot of files having been added, but if you `diff` one of the files, you'll get its complete history. – Aasmund Eldhuset Jun 04 '11 at 15:03
  • @Paja: Also, git doesn't track folders at all; it only tracks files and their paths, and creates the folders that are necessary to contain those files. So you can't commit an empty folder, and if you delete everything inside a folder, the folder will disappear from git. – Aasmund Eldhuset Jun 04 '11 at 15:05
  • @Aasmund Eldhuset: Then if I move a folder, and immediately after that modify one of the file inside the folder and commit after that, how can git track the file's history when it appears as a completely different file? – Paya Jun 04 '11 at 15:07
  • @Paja: As long as the modifications are small, it will work. Within a commit, git compares all deleted files to all new files and assumes that if the deleted file A matches the new file B in e.g. 95% of their lines, then A has in reality been moved to B. – Aasmund Eldhuset Jun 04 '11 at 15:24
  • @Paja: By the way, you can test git out locally since it is a distributed system - you don't need to set up a server. Just install it and run `git init` in some directory, and you have a repository where you can play around. I'd recommend reading some tutorial, though, since git is not particularily intuitive when you come from SVN. – Aasmund Eldhuset Jun 04 '11 at 15:26
  • @Aasmund Eldhuset: Thanks, +1, git looks very promising. However, I'm used to the way how SVN revision binds to the app's version - you can easily use revision number in major.minor.build.revision, and when user sends you the app's version you can immediately find the source code used to build the user's app. How can I achieve the same effect with git? Is it possible to embed git's revision into the version number? – Paya Jun 04 '11 at 15:29
  • @Paja: Unfortunately, that cannot be done in git, since git doesn't have sequential numerical commit numbers. Instead (and this is one of the things that takes a long time to get used to), it uses the SHA hash of the contents of a commit to identify the commit. However, you can _tag_ your commits (like in SVN, except that a git tag is much more lightweight) whenever you release a new version, and make the tag name reflect the version number. – Aasmund Eldhuset Jun 04 '11 at 15:34
  • @Aasmund Eldhuset: I have found [how to get the git commit count](http://stackoverflow.com/questions/677436/how-to-get-the-git-commit-count), which might be just what I'm looking for. But it quite surprises me there is no direct support for this. – Paya Jun 04 '11 at 15:42
  • @Paja: It's really a consequence of the distributed nature of git. If 10 developers sit at their own computers and commit their own changes locally at the same time, how can you decide the order in which a sequential version number should be issued? And more importantly, how can you issue the numbers in such a way that the numbers remain the same when they have been committed to the server? Short answer: you cannot. Mercurial "solves" this by using sequence numbers that are local to your own repository and invalid outside of it, but across repositories, you have to resort to hashes. – Aasmund Eldhuset Jun 04 '11 at 16:05