CVS in Windows Vista Best Practice? - windows

I have to start using CVS at my new company so that I can play nicely with the developers who are all *nix users. I happen to be a Windows Vista user and unfortunately do not have the ability to switch anytime soon. I am also not exactly a command line guru yet, so any simplified method is ideal for me.
I discovered TortoiseCVS today and it seems pretty straight forward, even though it says it is not directly supported on Vista, which worries me a little.
My questions:
Do you use CVS on Windows (Vista)?
What method do you use? (Tortoise CVS? Another option?)
Does your method get along well with repositories setup on/by *nix machines?
Any other advice for the noob? (Thanks)

I know many people who required a gentle introduction to cvs and ended up using WinCVS with no real difficulty. I know many others who are using the cvs client in Eclipse. This usage includes projects which are not otherwise managed by Eclipse. As for myself, I stick to the command-line myself because I feel the lack of GUI abstractions helps me to always understand exactly what CVS is doing. All three solutions work well on Vista, 32 and 64 bit. Our shop uses Mac, Linux, Solaris, and Windows, with the server on a Linux machine, and we never have any problems with compatibility.
There's one issue you should be aware of regardless of your choice of cvs client for cross-platform goodness, though. Most cvs clients convert between Unix newlines (on the server) and Windows newlines (on the client) by default. You should understand that this conversion is happening and be aware of the consequences.
This conversion will cause real problems if you try to commit a file with Unix newlines. So, you need to avoid, for example, copying files from a Unix repository to your Windows box, editing them, and committing them unless you've done the newline conversion. We had some real problems with this in my shop, and I instituted a strict policy that people should only communicate files between machines by committing them to CVS. Never, for example, by email, shared network directories, etc.
If your CVS repository has any binary files, some may not have been properly tagged as binary files. In *nix-only shop, nobody would notice, as the binary flag won't affect most binary files. But in a cross-platform shop, the binary flag routinely affects how cvs treats files, since it will disable any attempts at newline conversion. Typically, any file which was committed from a Unix box will be correctly represented in the repository, so you can fix the problem on the Windows end by merely changing the tag and re-updating. I.e.,
cvs admin -kb file
cvs update -A file

There are some other avenues you can take to interact with your *nix bretheren.
Install VirtualBox and a distribution of Linux so you can natively run the same toolset.
Install VirtualBox and a copy of Windows XP, which is known to work with TortoiseCVS.
You can find VMWare appliances pre-loaded with a linux distribution, which you can import into VMWare Player or VirtualBox. From there you just need to connect up to your shared drive the same way that they do.
Please note that CVS is no longer being maintained. You should really be moving to SVN, git, or some other version control system.

If you're using an IDE like Visual Studio or Eclipse, you should look for the appropriate plugin that integrates with your environment. Those might be better supported (though TortoiseCVS is likely just fine, even if the developers don't want to make any claims).

Related

Manual Cygwin Installation without using Setup.exe

I am having issues with finding all of the necessary files to actually install Cygwin correctly when not using the premade setup utility. The reason behind this is the fact that my company computer blocks the usage of the .exe, and won't give me clearance to install it, (they say it isn't needed for the job) but expects me to perform certain tasks that Cygwin would make much simpler.
So my question is thus; is there somewhere/someone that would have a list of packages that I would need to manually install from one of the mirrors to make Cygwin run correctly?
Well,
This is a new answer to an old question, but it might be helpful for someone...
Just run the installer with -B switch, for example:
setup-x86_64.exe -B
You should install it then on a path where you have rights.
If you don't need the full POSIX compatibility (which I'm guessing you don't, if the Unix subsystem isn't required for your job), I'd generally suggest you go with Mingw rather than Cygwin.
Sadly, Mingw also has an installer these days. It probably also requires admin (try it and see). However, you can download the individual components you need if you want to do it that way. That shouldn't require admin, so it would probably get you exactly what you want.
Mingw is also more corporate-friendly from a licensing standpoint, as its compiler doesn't render code built with it GPL like Cygwin's does.
Generally the rule is:
If you want to use Unixy tools to help with your native Windows development, you want Mingw.
If want to port a full (POSIX) Unix program to windows, you want Cygwin (and perhaps a support deal with Red Hat to get around the licensing problem).
There's a writeup on getting Cygwin [to work] on portable storage devices.
Boiling it down, you'd have to do this on a machine that does give you .exe/admin access to write to a 'stick, then run from the stick at work.
On the off-chance that super-lockdown-site allows you to run USB devices.
Use the GNUWIN32 utilities instead. http://gnuwin32.sourceforge.net/
That way you can choose only the .exe installs that you need, and it will be much easier to justify specific utilities than a humongous system install. If you hunt around on the site you can find the files directory where you can download a single utility, and if you get the -bin.zip version, then you can extract just the needed .exe file which would be even easier to justify and would not require your IT people to test an untrusted install package.
Stupid draconian rules or no, I would not recommend trying to thwart your employers rules. Try working to improve the situation or find another one.
But technically speaking if you can get a complete Cygwin install somewhere, you can copy the entire cygwin folder enmasse. There are a few things that you will want to change similarly to how I configured my cygwin installation to run from a thumb drive. I actually installed on my HD, copied it to the thumbdrive and then changed the batch file and a few other things to make it work. Here are the details: http://fadedbluesky.com/2011/portable-cygwin/
You could try installing it on another machine outside of work. After installing, copy the installed product's tree and Registry keys and environment settings to a CD or flash drive. Then you would have a DIY installation that you can copy and import settings manually. The installer doesn't do a whole lot else.
Don't count on job security if you're bypassing IT mandates after being explicitly told no, though. Getting an exception to the rule by submitting proper documentation through the proper process is usually the way to go.
You'll also have to hope that they aren't blocking the Cygwin programs and any Registry edits as well. It's not hard to find this sort of thing on a machine, either.

Tortoise SVN + Unreal Commander

I'm using Unreal Commander as a free alternative for total commander(win os). I've chosen to show native icon's and context menu and for tortoise cvs everything was fine. Since I started using Tortoise SVN I don't see it's icons on files and folders, and also if I left click on them I don't see SVN in context menu(still see CVS). But I can see all this stuff in usual win explorer. Does anyone have common situations or ideas what is the difference between them?
If you are on a 64-bit OS, and Unreal Commander is a 32-bit app, make sure you install the 32-bit version of Tortoise SVN in addition to the 64-bit one.
You need to install both versions if you are going to use both types of app with it. (You always need the 64-bit version, at least if you want it to work with Windows Explorer and other 64-bit file managers.)
Off-topic: If you are in this situation, it's also worth noting that it's quite difficult to make a 32-bit file manager show the real view of a 64-bit machine (without also potentially breaking third-party add-ons), since 32-bit processes see a virtual view of the filesystem. (They can turn it off within their process, but that may then break parts of them or other components they load/run which require it or now see a conflicting view compared to the thing that launched them and the arguments it passed.)
SVN and CVS are both version control systems but are pretty apart and don't mix. Usually windows clients connect a folder on your hardisk to a repository and will display information there based on the repo info compared with your local working copy. If you had a connection to a CVS it is not normal to show anything while using SVN as is totally another system.

In what OS should I host subversion?

I have decided to go with Subversion for a source control repository for my personal and side projects and I'm now trying to decide what OS to use. Currently my file server for my home network is Windows 7 beta. I'm wondering if I should wipe it and install Windows Server 2008 instead? Basically I'd like to know if there are things I could take advantage with a server OS that I can't with Windows 7. First thing that comes to mind is accessing subversion remotely with a VPN connection.
I'm a .net developer, but have dabbled in Linux a bit so I'm not completely turned off to the idea of an ubuntu or debian server...
I imagine the installation and configuration process might go off with fewer hitches if installed on Linux, just because of the package management, but that's assuming some experience with the package system of $whatever_distro. If you're comfortable with Windows, Subversion works perfectly well on there. I've set it up on both, but prefer the Linux installation process (easier Apache integration, in my view), but I had pre-existing Linux experience.
If you're familiar with Windows, I bet you'll find the installation and configuration process easier there. As others have said, many of the tools are cross-platform.
You can run a Subversion server on Windows or Linux (or whatever) so it really doesn't matter. Pick whichever one you already have and feel most comfortable with. Since you are a Windows developer I see no real reason to toss Linux into the mix though.
If your goal is to minimize the amount of work you put into the maintenance of subversion, go with the OS you are most comfortable with. Many maintenance scripts, and subversion hooks are written and available in perl and python which are available for both windows and linux.
One advantage to the Windows server OSes over their client counterparts is that the client OSes are limited as to the number of inbound connections. If you are going to be the only person working on the repo, this may not make a difference. However, if there are multiple people, then this would be an issue. XP Pro/Vista Ultimate are limited by Microsoft to 10 inbound connections. I cannot speak for Windows 7.
To make life easy, try VisualSVN Server. For personal projects there's no reason to setup a separate server just for SVN.
Windows 7 will be able to host Subversion with no problems whatsoever..
If your file-server is already setup and working under Windows 7, I'd say stick with that.. Adding SVN is no reason to install a new OS
You don't need a server at all to use subversion.
If you've already got a file server on your home network, and you're doing this only for you and your personal projects, just use a subversion client such as TortoiseSVN and create your repository (or repositories) on your file server via network share (or mapped network drive, etc).
I wouldn't recommend this for multi-user setups (unless each has their own repository), but for a single user this is the simplest option. And using this approach, to answer your question, you wouldn't gain anything by switching to a server OS such as Windows Server 2008.
I'd actually recommend going with a hosted Subversion provider instead of setting up Subversion on Windows or getting a second server for that purpose. I work for ProjectLocker, but if you Google "subversion hosting", you'll see there are a number of providers that offer free or reasonably priced solutions. The advantages:
It's a hosting provider's primary job to keep your code safe, secure, and accessible, so they focus on uptime, backups, and security monitoring so you don't have to
You don't have to learn how to be a system administrator or Subversion administrator; several providers have user interfaces that make it easy to manage users and permissions.
Hosting instead of DIY lets you focus on what you actually care about: writing great software
I suggest you take a look at ProjectLocker and some of the other providers and decide which one is right for you. You may decide that doing it yourself is the best option for you, but for many people in your situation, a hosted solution has met their needs.

What Subversion clients for Windows are there that do not need installation?

A colleague of mine agreed to using Subversion (SVN) for our little project, but only if he doesn't have to install it. He has a U3 USB stick where he keeps the project files and he would like the SVN client to live there as well. I tried searching for a non-installable SVN client, but couldn't find anything (although I suspect that many of the available clients would run if just copy-pasted from an installation folder). What can be recommended?
I'd really like to get version control going. It would be best if it had a GUI for merging files too, not just the command line.
Added: The copy-paste from an existing installation is one solution, but I'd like to see first if there perhaps isn't some client that does not require installation by design. If not, I guess RapidSVN is nice enough (although it does leave stuff in Windows registry).
Try RapidSVN. The CollabNet binaries can be used in a similar fashion for command-line support. Yes, these have installers, but you can simply copy the binaries around -- I use Universal Extractor to get the binaries out without having to run the installer.
Also, an enterprising user has packaged RapidSVN as a PortableApp. There is an "installer", but it really just unzips things into a directory of your choice and writes a default configuration file into that directory.
Try Alagazam.net's Subversion Windows Installer. There is also a version with just the binaries without an installer.
I'd go with the copy and paste the bin folder from SlikSVN.
It seems like SlikSVN is the underlying platform behind several graphical SVN clients. In my experience it seems stable and reliable.
Specifically, the bottom link on this page seems to be a non-install/xcopy precompiled package (although I haven't tried this one myself, only inspected it). It does not appear to be the newest, though. You might do your friend a favour by installing the newest SlikSVN on your own computer, and then share the bin files with your codeveloper.
If Java is available on the machines you could use SVNKit.
There's a portable version of SmartSVN which is what I use. It's a pretty good SVN client, but it needs JRE. It has a nice GUI and all.
There is a portable version of RapidSVN here. Just install it to a flash drive.
I was able to use the command line client that I had installed onto a USB stick. I then whipped up a couple batch files that did the basic checkout, checkin stuff, and one batch file that gave me a command prompt with a PATH set.
It doesn't have all the integration of something like TortoiseSVN, but I don't think you would be able to easily do that from a USB stick.
I've had this same problem, and thought it would be easier to find than it is. Bert Huijben posted the solution as a reply to Cecil, but his link was outdated.
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100
Scroll to the bottom where you can grab a ZIP file of the binaries. It works for me.
Alternative two should be pretty sufficient. But both methods requires installing it to the USB device which I guess is similar to just copying onto it. I checked Wikipedia and there are some standalone listed there.
SmartSVN, QSvn (portable version requires install), and Syncro SVN Client (they have versions which requires you to extract and run), etc. But does it copy, and does it run any different than installing to the USB?
Alternative One
Load Cygwin on the USB device, install SVN support and run it off of that. There isn’t any up (which I assume is more than possible) since I've had the luxury of using TortoiseSVN (requires install).
Alternative Two
Install TortoiseSVN on a USB device and use if off of that. It has a GUI interface for merging and diff. This may be relevant to your interest. However, Google has some results indicting they are slow.
Finally, there is an PortableApps version of RapidSVN:
Another alternative which may be acceptable to some users:
The Eclipse IDE is portable (not entirely; it depends on Java). Use the Eclipse SVN plugin (Subversive or Subclipse). This takes care of the daily needs.
You may choose to point to a Java Portable installation to make it truly portable. However, I believe it might be slow to run off a USB pen drive.

What is the best and most complete implementation of Unix system commands for Windows?

I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's going to work, so I would love for alternatives and I'm sure there are people out there interested in this who aren't running Cygwin.
These work very well for me: http://unxutils.sourceforge.net/.
Cygwin is not so good on Vista or 64 bit, so I stopped using it a while back.
I use Cygwin, but I have used the Berkley Utilities in the past. They worked well enough, if you are used to DOS and you just want the commands. There are some alternatives listed at TinyApps.
Maybe you could also consider running a command line version of Linux in a virtual machine? Colinux is also an option, but it's immature.
Powershell is what you are looking for, it contains aliases for a lot of UNIX commands and a lot more besides.
John
UnxUtils isn't updated as often and isn't as complete as Cygwin but runs natively just like any other Windows command line utility.
Cygwin acts more like a Linux command line emulator. It does feel pretty clunky but it is easier to port utilities to it and this is more complete than UnxUtils.
I personally don't like Cygwin. It really does seem to be wanting. Unless it has some specific tool you want that only works in Cygwin I'd find native ports.
http://www.activestate.com/Products/activeperl/index.mhtml is a nice Perl package for Windows.
http://www.locate32.net/ - I've always liked locate. Much faster than Grep for finding files by name.
Microsoft distributes a UNIX API compatibility layer for Windows NT-based OSes, as well as many common UNIX command line utilities that run on top of this compatibility layer. Unlike Cygwin, it doesn't sit on top of the Win32 subsystem, but instead interfaces with the NT native APIs directly. It supports features that may be difficult to implement on top of Win32, such as case-sensitive filenames and fork().
The Windows 2K/XP version is called Windows Services for UNIX (SFU). SFU is a free download from Microsoft, and also includes an NFS server and client.
The Windows Vista version is called Subsystem for UNIX-based Applications (SUA). SUA is included in the Enterprise and Ultimate editions of Windows Vista, but does not include any NFS support.
Neither SFU nor SUA include an X server. It is possible (but possibly ironic?) to use the free Cygwin X server with SFU/SUA applications.
The Wikipedia entries on SFU and Interix have more details and history.
Linux/BSD :)
Why vote down this question? It's obviously meant to be tongue in cheek is it worth the voter and the receiver losing rep over? Can't you people leave anything at zero and mark up the answers you want to see float rather than mark down the funny one liners?
In answer to the question I've used Cygwin in the past but always found it clunky and wanting. I don't think it's the tools problem but mine but I have book marked Eric's suggestion of unxutils for when my new windows machine arrives tomorrow.
I use Cygwin alot.
I use it for any mvn commands, find, grep, perl scp and all the other stuff i got used to use all the years I only worked on FreeBSD desktops and servers.
I have my old .vimrc, .zshrc, my .ssh/config and all the other nice stuff. I use rxvt.exe instead of cmd.exe which made all the difference for me! Resize, decent buffer, fonts and so on.
andLinux is a distribution of coLinux, which runs the entire Linux kernel inside Windows (with better performance than a VM). Then, with the help of Xming (an X windows server for Windows), you can have Linux windows mingle along side Windows windows.
With that, pretty much everything Linux-based will just work. You're not limited to just the tools that have been ported to Cygwin, you can apt-get anything you want.
andLinux also includes a few niceties, such as desktop shortcuts to launch Linux apps, a launcher that lives in your tray, and context menu items (right click a text file and you can open it in Kate)
The downsides of andLinux are:
Accessing the Linux filesystem is tricky. You have to set up Samba in both directions.
Connecting to a Linux program from a remote connection is also tricky (but possible)

Resources