fooberry

Sweetness without context.

Evolutionary Git Prompt

August 6th 2010

As might have been assumed in my previous post we are transitioning to git and Im tailoring my command prompt to something that suits the way I think and the information I want to see change over time. Right now my prompt gives me several immediate clues:

  • the branch name
  • if the branch is dirty (via red)
  • if there are files being staged (via yellow)
  • what the changes are
    • + adding files
    • ~ changing files
    • – removing files
    • ? untracked files
    • –> renaming files

As I use git more and more, not scenarios arise. The most recent one is what happens if you change a file after you stage it.

 SS-2010.08.06-10.34.45

In this case we staged a and then made more changes. What should the command prompt look like? It is something that is important to me because I might be unaware that there are changes that arent going to be committed. 

But how do you show that? That other symbols Im using are pretty clear. What about this case?

Maybe something like:

d:\temp\foo (master ~1~) >

I kind a like that because it tells me there is one file will only partially be committed. The prompt could get very large but given this case is rare, its unlikely to be that big of a deal.  Those changes made after the stage will not be committed.

YouTrack under SSL

July 30th 2010

I have to admit, this post is going to be lame. I wont be offended if you stop reading now because it is mostly for my own benefit.

Recently we moved our YouTrack server to a publicly accessible server and got it all setup with an URL like http://dev.acme.com. We then wanted to move out TeamCity server to the same box so moved both TeamCity and YouTrack into a Tomcat app server and gave them URLs like dev.acme.com/teamCity and dev.acme.com/youTrack. Sweet. Everything is going great.  We have them talking to each other.

Lets flip them over to talk on only SSL. This wasnt was easy as I hoped. Actually it was super simple, but finding the steps was painful. If you look for how to setup SSL with Tomcat you find a load of articles using tools and certificates we dont have handy. We do have our wild card certificate from IIS that we can export and then the steps are easy.

Sweet. While I was in that file I commented out the Tomcat connector on port 80 so IIS could listen on that port. Im more familiar with IIS and setting up the HTTP to HTTPS redirect was easier for me in IISwhich I did next.

All done. Everything is golden right? It works. It redirects to HTTPS if you request HTTP. Awesomeexcept we cannot attach files. Bummer.

We get asked questions like:

Are you using a proxy?
Please specifiy procy if you are using one, otherwise it is impossible to post the attachment.

Since we are not using a proxy I said no and then got another error message.

Sorry, cannot attach the image.

Luckily this was an easy fix as well. This was a fairly easy issue to find since JetBrains publicly tracks the issues with YouTrack. That was exactly out problem. We had YouTrack setup to listen on http://dev.acme.com/youTrack instead of https://dev.acme.com/youTrack. Switching that in the settings fixed our problem.