[Tfug] Version Control

John Gruenenfelder jetpackjohn at gmail.com
Fri Mar 29 19:06:54 MST 2013


Don, Yan,

On Fri, Mar 29, 2013 at 2:10 PM, Yan <zardus at gmail.com> wrote:
> As for the automatically figuring out what diff tool to use thing, git can
> definitely use file extensions (as shown here:
> http://lars-tesmer.com/blog/2010/09/20/git---how-to-get-better-diffs-for-images/)
> for automatic file type identification. As you've said, you'd prefer a fully
> automated approach (so you can check in jpegs as "blah.ps" and still have
> git realize they're jpegs). I've never really had the need for that, and
> don't know exactly how one would go about accomplishing such a thing, but
> there is at least part of a chapter of the git book dedicated to diffing in
> general (http://git-scm.com/book/ch7-2.html), so you could read up on it if
> it's critically important. A quick search yielded that the initial setup
> will likely contain a decent amount of manual work. One solution would be to
> set up a default differ (as in here: http://jeetworks.org/node/90) that
> would determine the filetypes involved using "file" or something and then
> call the appropriate application. This'll achieve the behavior you want, but
> now you're stuck maintaining your diffing script (which may or may not be a
> headache).

Subversion has always done a decent job of this for me.  I *think* it
uses file magic to determine the types of files which is stores in its
database as MIME types.  If SVN does not pick correctly I have found
it very easy to change the MIME type associated for one or more files,
such as changing images which were given an only semi-correct generic
"application/octet-stream" to a more correct "image/jpeg".  Of course,
either way they were binary files.

As for a Subversion GUI, the only one I have any experience with is
the Subversive add-on for the Eclipse IDE.  I found it surprisingly
good and full featured.  I have yet to find any SVN feature that *I*
needed that was missing.  Perhaps more telling is that I have even
been able to resolve repository conflicts using the GUI which is
something one usually needs to use the command line for.  Of course,
the problem with this particular "GUI" is that it requires Eclipse to
function and, clearly, what's the point of that if you aren't actually
developing with Eclipse?

I have *not* used it, but I can see from reading online that the
(unfortunately) Windows-only SVN client "TortoiseSVN" is very popular
and very well liked.  There is also a cross-platform project called
RabbitVCS with the goal of offering a full GUI for several VCS
(including Subversion, git, and Mercurial) and they seem to be using
TortoiseSVN as the guide for the GUI design.  Unfortunately, RabbitVCS
has a ways to go and currently only supports the Nautilus file manager
and Subversion.

As far as I can tell there are no "official" Subversion GUI programs
that are developed lockstep with the VCS tools.

> At some point, you've mentioned ad-hoc text files littering the heirarchy.
> Git's a bit better than CVS and SVN in this sense, as it at least keeps all
> of its stuff in the project's root directory (mostly in .git/, but custom
> configuration such as submodules, per-project diff configs, and so forth
> spill out into other dotfiles in this directory). This, however, has the
> notable downside of being unable to check out a subdirectory of a repository
> (like you can in SVN), so you should be aware of that. The stuff *inside*
> the .git directory is described in the git book
> (http://git-scm.com/book/en/Git-Internals) if you want to interface with it.
> I think the general consensus is that if you are doing that, you're doing
> something wrong.

This is something the Subversion developers have finally corrected
with version 1.7+.  There is now a ".svn" directory in the root of the
tree you checked out and nowhere else which is very nice.  As far as I
have been able to tell, this change has *not* effected the ability to
check out an arbitrary subdirectory in the SVN repository... but don't
quote me on that.  :)

Just a few extra data points for your comparison, Don.


-- 
--John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for Palm OS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list