OK to manually rebase feature branches when using Git Flow? - git-flow

Im using Git Flow:
http://danielkummer.github.io/git-flow-cheatsheet/
Is it OK to manually rebase develop into my feature branches? Other peoples work on develop may affect what im doing so id like to keep my feature branches up to date.

It's OK to rebase the develop branch in a feature branch you are working on.
I do it sometimes when I'm working on a feature that takes a while to develop and in the mean time new features are introduced in the develop branch.

Related

Upgrading MVC 2 project to MVC 5

I'm in the process of converting a large enterprise solution to a VS2013 solution and I've run into an issue with one of the projects. One of the projects is built using MVC2 and we're hoping to get it up to MVC5 with minimal impact. What would be the best way to go about doing this?
Upgrade 2 -> 3 -> 4 -> 5 one at a time?
Upgrade directly 2 -> 5?
Create a new project and manually drag things over?
?
Any tools, resources, past-experiences are greatly appreciated.
I wouldn't go so far as to actually upgrade to MVC3, make it work, then upgrade to MVC4, and make it work, etc. But, essentially, yes, you'll just need to follow the upgrade path. Each release has notes that define things that changed, were added, or were removed. The newer version's release notes don't go into what happened in the last release, so you have to sort of compile the notes together on your own. You evaluate your app against each release's notes and determine what changes if any you need to make in your app. Then, go ahead and upgrade directly to MVC5 and make those necessary changes.
And, of course, make sure you have a backup of some sort. If you're using version control (and why wouldn't you be?), create a new branch specifically for the upgrade, and of course, only merge it back in once you know everything is working properly. This is where having comprehensive tests comes in super handy.

Teamcity Weekly Release Versioning and Workflow

I'm trying to get a weekly release up and running in TeamCity and I'm having a hard time trying to comprehend how I'm going to version it. Currently versioning goes as follows
[major].[minor].[buildnumber].[svnrevision]
major = major release
minor = incremented on release (weekly-basis) to production
buildnumber = teamcity's autoincremented build number
svnrevision = revision number from svn
Does this mean that every week, after creating a tag, I'll have to create a separate Build Configuration for the new release just so I could increment the minor version like so?
1.1.{0}.%build.vcs.number.*%
to
1.2.{0}.%build.vcs.number.*%
and point the new build config from trunk to the tags\release-1.1.0 folder?
Is there no easier way to do this?
I guess I'm a little bit confused as to why you would change your build configuration from the trunk to the tag / release folder as the codebase version number changes.
If I were doing it, I would simply create one configuration that builds from the trunk. Once a week you can up the version number, say from 1.1.x.x to 1.2.x.x in the TeamCity configuration screen and keep building from trunk. Next week you up it to 1.3.x.x and you keep building from trunk.
Usually the tags are just meant to be snapshots in time, it is the exact source that was used to make a certain build back in time. I would expect your tags build folder to look more like \tags\release-1.1.232.3232, etc.
Sometimes you might have to take a specific tag and create a branch out of it. That is if you need to work on a former release to do some bugfixes before you release your next version ( from trunk ). In that case I would create a new configuration to do the branch build, the codebase would then be something like \branches\release-1.1.0
Now you have one configuration for the trunk, that one will probably be at 1.2 or 1.3 and keeps incrementing while the branch configuration will be at 1.1 or something similar. At a later time you might use the branch configuration for another version number since bugfixes are done in 1.1 like you suggested with the tags.
It seems to me from reading this over again that perhaps your using the concept of branches as tags...
In TeamCity 6 and up, you can have multiple build steps.
You could create an initial build step, before the actual build, which uses a custom MSBuild task. This would check out a global AssemblyInfo.cs file which all projects link to (see Automatic assembly version number management in VS2008) for more details), grabs the version number from the file, increments the minor revision, writes the new value back, and checks in the updated file.
Additional build steps would then run the build, and tag.
You can communicate updates to TeamCity from your build script using service messages, including reporting the build number, see http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingBuildNumber

How do I get the Assembly version from my sln into a continuous integration labeller?

I want to obtain the assembly version from my solution and apply that to a cc.net label. I think I'm doing it backwards since all the info out there have the CI server set the version. But I'm not sure how to integrate different release versions and the development branch into CI. Every time we release we up the revision number. Would/should I add a new project in cc.net for every branch? Is there a way to automatically get the latest branch? Sorry for so many different questions in one...question. I'm new to this CI stuff.
FinalBuilder and the AssemblyInfo Updater
[Update : Cool, can't add hyperlinks. Put FinalBuilder and 3xw en dotcom in the end in front of the following url:)
/Products/FinalBuilder/FeatureMatrix/FeaturesCompilerActions/tabid/98/Default.aspx
Use "PropertySet Define" based on .NET Assembly Numbers
Use "PropertySet Load"
Use "PropertySet Incremement"
Use "AssemblyInfo Updater" to save it again
And you're done. :)
You will find this all much easier if you switch to TeamCity. I've wrestled with so many nant scripts/cruisecontrol config files in the past I'm almost blind from angle brackets.
I cried like the accountant who was shown the first spreadsheet program when I started messing with TeamCity. It will make your life 1000% easier.

Best way to build trunk AND a branch on the same CruiseControl.Net server

We currently have a CruiseControl.Net server that is merrily building the trunk on our svn server. I have a new requirement to build the "latest" branch as well; is there a best practice in CruiseControl to handle this? What specific changes are needed to build from the trunk and a branch at the same time?
Make a second project just like the original where the source control is pointed to the proper branch.
As far as Cruisecontrol.net is concerned, a project is a project. It doesn't care whether it's a branch or a trunk. Simply setup another project in the ccnet.config that points to where the branch is located.
To keep things organized, i like to add the version number to the name of the branch projects like this:
ProjectX <- Trunk
ProjectX-4.0 <- Historical branch for v4.0
I generally create a new working directory named branch, set up the source control to monitor the branch and pull to the new folder. I also put in an exculusion filter on the trunk build so it does not get kicked off by a check in to the branch (our branches usually reside within the trunk realm of checking for changes). I also remember to change the labels, if we label, to reflect the branch naming convention. One very helpful thing you can do is if you will only ever have one branch active simply name it branch that way once you have your configuration all set You only have to comment or uncomment those parts in the config file as needed, instead of having to upgrade it in all the places like if one time it is branch 6.1 and next time it is 6.2, it saves a lot of cut and replace and I only have to changed the project name and the label the next time we use a branch.

How do you handle versioning on a Web Application?

What are the strategies for versioning of a web application/ website?
I notice that here in the Beta there is an svn revision number in the footer and that's ideal for an application that uses svn over one repository. But what if you use externals or a different source control application that versions separate files?
It seems easy for a Desktop app, but I can't seem to find a suitable way of versioning for an asp.net web application.
NB I'm not sure that I have been totally clear with my question.
What I want to know is how to build and auto increment a version number for an asp.net application.
I'm not interested in how to link it with svn.
I think what you are looking for is something like this: How to auto-increment assembly version using a custom MSBuild task. It's a little old but I think it will work.
For my big apps I just use a incrementing version number id (1.0, 1.1, ...) that i store in a comment of the main file (usually index.php).
For just websites I usually just have a revision number (1,2,3,...).
I have a tendency to stick with basic integers at first (1,2,3), moving onto rational numbers (2.1, 3.13) when things get bigger...
Tried using fruit at one point, that works well for a small office. Oh, the 'banana' release? looks over in the corner "yeah... that's getting pretty old now..."
Unfortunately, confusion started to set in when the development team grew, is it an Orange, or Mandarin, or Tangelo? It looks ok. What do you mean "rotten on the inside?"
... but in all honesty. Setup a separate repository as a master, development goes on in various repositories. For every scheduled release everything is checked into the master repository so that you can quickly roll back when something goes wrong.
(I'm assuming dev/test/production are all separate servers, and dev is never allowed to touch production or the master repository....)
I maintain a system of web applications with various components that live in separate SVN repos. To be able to version track the system as a whole, I have another SVN repo which contains all other repos as external references. It also contains install / setup script(s) to deploy the whole thing. With that setup, the SVN revision number of the "metarepository" could possibly be used for versioning the complete system.
In another case, I include the SVN revision via SVN keywords in a class file that serves no other purpose (to avoid the risk of keyword substitution breaking my code). The class in that file contains a string variable that is manipulated by SVN and parsed by a class method.
An inconvenience with both approaches is that the revision number is not automatically updated by changes in the externals (approach 1) or the rest of the code (approach 2).
During internal development, I'm using milestone numbers (M1, M2, M3...). After release, I'll probably just update dates ("the January 2009 update").

Resources