I was struggling with how to use TFS as a source code repository for iPhone development.
My boss will never let me use Subversion (or God forbid Perforce), so I was stuck with TFS source control.
The solution is to go and buy tools to bridge Mac to TFS, and I am not trying to advertise here, but the Teamprise Client Suite for Mac OS X is the bridge between Mac OS X and TFS.
For standard check-ins and developer workflow, there is no integration between Xcode and TFS. You have to do it all manually through the Teamprise Explorer client.
For builds, it turns out that Automator and the Teamprise Command Line client do the trick.
Is there some Xcode to TFS bridge out there?
What source code control system are you using for iPhone development?
The key for me is the following bash script embedded in an Automator workflow.
%1 = Local folder to do a code pull to.
%2 = Project Name to do the pull from.
This script assumes the Teamprise Command Line Client is installed to ~/Teamprise
PATH="$PATH:~/Teamprise:~/Teamprise/lib"
cd "$1"
mkdir "$1/logs"
tf workspace -delete BuildScript -server:http://TFSServer -login:uname#domain,password >> $1/logs/wsdelete1.log
tf workspace -new BuildScript -server:http://TFSServer -login:uname#domain,password >> $1/logs/wscreate.log
tf workfold -map "$/TFSRoot" . -workspace:BuildScript -server:http://TFSServer -login:uname#domain,password >> $1/logs/workfold.log
tf get "$/TFSRoot/$2" -all -recursive -server:http://TFSServer -login:uname#domain,password >> $1/logs/get.log
tf workspace -delete BuildScript -server:http://TFSServer -login:uname#domain,password >> $1/logs/wsdelete2.log
#pump the tfs landing folder to the next step in the Automator script.
echo $1/Projects/$2
As Louis states, XCode doesn't currently provide a publicly accessible plug-in model for us (Teamprise) to provide a TFS integration with - it is something that we would love to do.
We've experimented with a couple of hacks - such as pretending to be the Perforce command line and talking to TFS instead, however these internal proof of concepts have so far not worked out very well - especially as we would want to ideally have Work Item Tracking linked in somehow as well so that you can associate check-ins with bugs etc.
Today, the majority of our customers that are using Teamprise to talk to TFS from XCode are doing so either using the standalone UI tool (Teamprise Explorer) or are doing Automator actions like you suggest to hook into the tf command line.
Apologies that this isn't a great experience. All I can suggest is that you file a bug with Apple to provide a plug-in model for SCM systems to hook into XCode. Hopefully if there is significant developer demand then we might have more luck than just us requesting it.
While internally Xcode is using a plugin system to support different version control systems, it is not public or documented. Aside from minimal support like running some commandline scripts there is no supported way to use any version control systems except for those Xcode ships with.
You should file a bug with Apple asking for native support for TFS, or a supported VCS plugin system for Xcode.
Anyway, in the short run I don't think you will find an satisfactory solution to your problem.
If you must integrate with a TFS server, your best route at this time is to use SVNBridge and then connect to the bridge via Xcode's built-in subversion functionality.
Also, installing a VisualSVN server for the first time took me less than 15 minutes for a base install and another ten or so configuring users and getting the SSL cert signed by our company's root certificate. Give it a try, it was really easy.
Related
I'm writing some new web services in Go.
What are some deployment strategies I can use, regardless of the target platform? For example, I'm developing on a Mac, but the staging/production servers will be running Linux.
Are there some existing deployment tools I can use that support Go? If not, what are some things I can do to streamline the process?
I use LiteIDE for development. Is there any way to hook LiteIDE into the deployment process?
Unfortunately since Go is such a young language not much exists yet, or at least they've been hard to find. I would also be interested in the development of such tools for Go.
What I have found is that some people have been doing it themselves, or they've adapted other tools, such as Capistrano, to do it for them.
Most likely it's something you'll have to do yourself. And you don't have to limit yourself to shell scripts - do it in Go! In fact many of the Go tools are written in Go. You should avoid compiling on the target system as it's usually a bad practice to have build tools on your production system. Go makes it really easy to cross compile binaries. For example, this is how you compile for ARM & Linux:
GOARCH=arm GOOS=linux go build myapp
One thing you could do is hop on the #go-nuts freenode IRC channel or join the Go mailing list and ask other Gophers what they're doing.
Capistrano sounds like a good idea for deployment alone. You can also do cross-compilation as Luke suggested. Both will work just fine.
More generally though... I'm also kind of torn between OS X (development) and Linux (deployment) and in fact I ended just developing in a virtual machine via VirtualBox and Vagrant. I'm using TextMate 2 for text editing but installing many of development tools on a Mac is just a major PITA and I'm just more comfortable with having Debian or the like running somewhere in the background. The bonus is - this virtual environment can mirror deployment environment so I can avoid surprises when I deploy my code, whatever the language.
I haven't tried it myself, but it appears you can cross compile golang (either with goxc or Dave Cheney's golang-crosscompile), albeit with some caveats.
But if you need to match the environment with production, which probably you should most of the time, it's safest to go as Marcin suggested.
You can find some prebuilt VirtualBox images on http://virtualboxes.org/images/ although creating one yourself is pretty easy.
what are some things I can do to streamline the process?
The cross-compilation idea should be even more appealing with Go 1.5 (Q3 2015), as Dave Cheney details in "Cross compilation just got a whole lot better in Go 1.5":
Before:
For successful cross compilation you would need
compilers for the target platform, if they differed from your host platform, ie you’re on darwin/amd64 (6g) and you want to compile for linux/arm (5g).
a standard library for the target platform, which included some files generated at the point your Go distribution was built.
After (Go 1.5+):
With the plan to translate the Go compiler into Go coming to fruition in the 1.5 release the first issue is now resolved.
package main
import "fmt"
import "runtime"
func main() {
fmt.Printf("Hello %s/%s\n", runtime.GOOS, runtime.GOARCH)
}
build for darwin/386
% env GOOS=darwin GOARCH=386 go build hello.go
# scp to darwin host
$ ./hello
Hello darwin/386
Or build for linux/arm
% env GOOS=linux GOARCH=arm GOARM=7 go build hello.go
# scp to linux host
$ ./hello
Hello linux/arm
I'm developing on a Mac, but the staging/production servers will be running Linux.
Considering the compiler for Go is in Go, the process to produce a Linux executable from your Mac should become straightforward.
Is it possible to set up a remote NetBeans C++ project where the source files are only accessible via SSH?
My project needs to build on a Linux box, but I'd like to develop it on a Windows machine.
Checking out the code via SVN to my Windows machine is not an option since there are a few files that differ only by case, and NTFS is not case sensitive (unfortunately, I can not change them).
I'm well aware that Windows can be kind-of forced be case-aware and the ideal solution is to just re-name those file to something sane.
However, I'm just trying to solve this using NetBeans. Since it's a remote project anyway, why bother to keep any files locally.
Thanks
Currently, no. In general programming files with different cases of the same name is a bad practice.
You can enable case sensitivity in Windows - you may need to have a Professional version or better.
For Windows XP: http://support.microsoft.com/kb/817921
For Windows 7: http://technet.microsoft.com/en-us/library/cc732389.aspx
See also: Windows Services for Unix
Another solution would be to setup VNC/RDP on the remote Unix system. The overall solution should be to conform to a better file naming convention:
Programmer 1: "Hey man, take a look at noCamelCase.cs - I just rewrote it."
Programmer 2: "Um, nocamelcase.cs is blank."
There are two ways of doing remote builds with Netbeans. The first, the project is stored locally. You just create a regular project and on the 2nd page of the wizard you specify the network directory with the source and the remote build host. I've used this for Solaris client to Linux server, but not from Windows as we don't have the mounts exported by SMB. This uses ssh and some shared lib interposers to get the build info.
The second way is to create a remote project. In this case the project is created on the remote host and date is copied on demand to the client. I've only doe a few tests with this as I preferred the first method as it had much better latency.
Lastly, you could either use vnc or install X on your windows machine and do everything on the Linux machine.
I've been using RCS (revision control system) from MKS Source Integrity for several old projects. I have to move to a new Windows 7 computer. The old version I have does not install on Windows 7, and a new version of the software is very expensive.
What is the best free or cheep source of RCS for Windows 7? Also, will it be compatible with MKS Toolkit which I am still going to install?
The official website for RCS has Windows 32-bit binaries, but they are dated. YMMV. http://www.cs.purdue.edu/homes/trinkle/RCS/.
Edit: I just tried the binaries (from the first zip file). They seem to work on a trivial text file.
I put them in a directory. Then I created an "RCS" directory. Then I created a text file. Then I ran "set TZ=EST" in my cmd.exe window (the tools require a timezone). Then I was able to check the text file in and out with the RCS command line tools.
Note that large files are probably not supported given the date of the binaries.
If you want the binaries to be available system wide, you have to place them in a location on your Windows PATH and set the TZ environmental variable to the zone you need in your account's environment.
RCS offers reverse merge which can be useful when you want to apply selected fixes for ECO version of your software without addition on less tested product enhancements. I was able to produce ECO version of real-time control system with several hundred fixes without the assistance of software engineers working on the next release of the product. ClearCase did not offer similar capability at the time.
We used rcs and gmake. Build scripts were written in Perl. Each ran on native Windows. I wish the idiots at the software company in Washington would use / instead of \ for file separator.
On Windows 7 64-bit SETUP32.EXE fails "not compatible with the version of Windows you're running"
My workaround:
Copy sintcm32.dll from a 32-bit machine into c:\windows\syswow64.
In Explorer, double-click a .pj file, set description to "MKS Source Integrity Project/Sandbox File" and target to "[network location]\mkssi\mkssi32.exe"
Create start menu shortcuts to "[network location]\mkssi\mkssi32.exe" etc.
Git (MSysGit) works on Windows 7 and is free. There is a learning curve associated with Git, which I think is worth it (for the benefits you get, especially regarding a distributed VCS), but some may disagree. This bundles come with bash and an ssh client (useful synchronization with remote repositories).
EDIT: For RCS specifically, there is an RCS package via Cygwin or an independent package from the Purdue RCS Homepage (the latter says "The latest PC (OS/2 DOS Win95 NT)", but I guess it might work on Windows 7, I'm fairly sure the Cygwin package works on Win 7).
Currently I am working on a project that involves the following daily workflow:
Update local code and edit
commit to subversion repository
ftp to a testing server
I have been using Netbeans to handle all of this but frankly it, combined with the other stuff I am running, eats up all of my machine's resources frequently leaving it sluggish. By switching to a lighter text editor, a standalone ftp client and a standalone svn client I avoid the slowdowns and resource hogging but working becomes clunkier as I move between apps. Basically I really like Netbeans but until I can get a more powerful machine (Macbook Pro next week?) I am stuck.
What is your workflow? Any suggestions on how I can improve mine? Can I cut out FTP with Subversion in some way?
p.s. Subversion use is cast in stone so no git. Also, I'm on a Mac.
On Mac, I use TextMate as my editor of choice. Lots of language goodies for speeding development in whatever language you're doing via Bundles. It has an SVN bundle, which lets you update/checkout/commit directly. I use that for quick updates/checkouts. On my test server, I have another SVN working directory. I set up an SVN Post Commit hook to 1) automatically update the test server with the latest code, and then 2) send a twitter message to inform other developers of the change.
If I want to do more in depth work on the SVN repository (tags, commit logs, diffs) I tend to use the command line, or use a dedicated client like Cornerstone.
Eclipse is an IDE, which also includes syncing with version control, and FTP.
maybe install svn on the testing machine and do an update automatically every ten minutes or so. Or at a specific time.
Just an idea.
Sascha
Almost all the programming editors (Vim, Emacs, etc) support subversion integration.
The only missing link is the FTP to test server. You can do this easily with a post-commit hook in subversion.
If you want to run some pre-commit tests as well, check out this script I had written some time back:
http://code.google.com/p/svn-pre-check/
In case someone is still looking for svn ftp connection i would suggest svn2ftp.
I'm forced to use SourceSafe at my job. There is no way this is going to change. I would like to use another source control for my own need in parallel. I want to be able to keep an history of my modifications, branch easily and merge. I can install any application that doesn't requires admin rights. I cannot install Python or anything that integrates in File Explorer.
I'm not much of a command line guy so a GUI is a must. I managed to install Mercurial but not TortoiseHG. There is a chance msysgit would install but the GUI isn't very good.
Any suggestions?
you can install svn command line just by unzipping it, but if you want TortoiseSVN for the GUI then I you may need admin rights, not sure. But you don't need a separate gui if your IDE supports SVN, like Eclipse or any other java IDE does.
Git has a pretty nice command-line interface with color and auto-completion. After reading the Pro Git Book I found the command-line is great.
There is GUI bundled with it. It is nice for viewing logs and merges but may be not to your taste. There is also a TortoiseGit shell extension (like the famous TortoiseSVN), but that would require admin privileges to install (as opposed to Git portable).
Install and use a Virtual Machine product and go crazy with whatever you want, then look for another job.
I would check out SourceGear Vault, it has SourceSafe Import and SourceSafe Feature support. This may need admin rights though...
Another tack is to synchronize a copy of the directory to another machine where you do have some rights. I would recommend rsync -- I think there are several Windows versions available.
On this other machine you can now use whatever tools you like. I know it's a kludge, but then so is working on a system where you aren't even trusted enough to install something like Python.
AFAIK any TortoiseXX will need admin rights as it needs to hook up explorer.exe to use it. you should still be able to use hgtk part of tortoisehg to get at the windows though
There is no way this is going to
change
I don't mean to say that you should shout your head off about how svn, or whatever, is great, and moan about VSS all the time. But I find it hard to believe that a well-reasoned proposal to switch to a newer, better version control system outlining the pitfalls of VSS (no security - all users have write access to the history of everything, for example) would be ignored.
If you can't install programs that integrate with explorer, then using any version control system is going to mean learning to use it from the command line!
Check out bazaar (bzr). I've not used it personally but it claims to have an excellent gui which may mean you don't need a TortoiseXX install.
Just use a version control tool from the command line. It isn't painful and it can be automated quite easily via your existing tools. SVN isn't going to be great when interacting with an existing version control system (it is finicky about files/directories being deleted, renamed etc), whereas the DVCS tools (I prefer Mercurial) are much smarter about it.
My recommendation: Use Mercurial. It has sane ignore rules so it can be trained to ignore VSS cruft, a single .hg directory that contains all the VC data, and easy branching (which will help you change gears more often). git is fine too, but has a steeper learning curve.