branch

How should I implement a map of string to method in Java?

Hello, I have a list of XML tags and a method for each of them inside my class, getting that tag as an argument and doing its work. So all the methods get the same input and I want to loop through the list of tags, calling appropriate method each time. In Python I've made it with a hash of strings (names of tags) to lambdas (self.metho...

SVN - Manage a partial merge of a revision

Hello, So I have an issue that is causing me a lot of grief in Subverion. I am working in a branch that is supposed to remain active until my feature set is development complete before re-integrating. Unfortunately, something I have completed has now been deemed by the business to be 'mission critical' and they want me to cherry pick ...

Checking out the branches of a git repository into sub folders?

Is it possible to take a repository (such as CakePHP1.x @ http://github.com/cakephp/cakephp1x) and checkout the master plus branches into sub-folders? For example, my desired folder structure would be like this: cakephp1.x |------ 1.2 |------ 1.3 |------ master I know you can use git checkout -t origin/branch to swi...

best way to versionize different git branches

We have the following scenario: We have several base versions of our game OpenLieroX; right now 0.57, 0.58 and 0.59. For each base version, we have a seperate branch. Each such base version has several releases (like 0.57 beta1-beta8 and rc1, 0.58 beta1-beta9). When we are working on new stuff, we are working in the highest base version...

When making a branch in TortoiseSVN, what do "head", "working copy", and "specific" revisions mean?

A new user of Tortoise SVN, working over source control. I have a Visual Studio solution which consists of 5 webAppliation projects. I need to take one out and work over it in a branch. When I try to branch it, It is asking me of one of these options head revision in repository specific revision in repository working copy revision ...

subversion and tortoisesvn: branching / moving directory

Hi all, my company'scode is in a subversion repository, and it has worked well so far. I followed the advice on how to setup the repository, i.e. I have branches/tags/trunk sub-directories. But I now want to be a bit more organised, and have 2 meta-branches, dev and release. The former is obviously for development purpose, where the eng...

Create branch from current working tree and reset to HEAD

Hey there, I currently work on a feature that turns out to be bigger than expected, so it's propably the best to create a branch to work on it. So I need to create a new branch from my current working directory and reset the master branch to the current HEAD so that some fixes to the production environment can be done. Somehow this sou...

SVN: How can I move one branch over the top of the other?

Due to some mismanagement of our SVN repository, we ended up making a branch, named Stable, containing a stable build of our code (the branch actually got started from a tag of the last release, rather than the trunk). Basically trunk has been 'infected' by some changes made by our new programmer, who didn't really know what they were d...

git rollback single file

I'm currently in branch 'foo'. I just ran git merge master. Only problem is there was a certain file in foo that I wanted to keep. Is there a way to get it back but keep all the other changes from merge master? ...

Branching with Mercurial SCM

So right now I'm learning Ruby on Rails, and I'm working through the book "Agile Web Development with Rails". I've also decided that I want to give Mercurial a go, because I've read up on distributed SCM's, and it seems like an ideal situation. I still, however, prefer to push my code remotely to my Linux VPS just incase my hard drive ...

When should you branch?

When working with a SCM system, when should you branch? ...

How to undo a commit and commit the changes into the other branch in Git?

The common mistake I make in git is not check on which branch I am commit changes to a wrong branch (on branch B, thinking I'm on A, commiting a change for feature A) How do I get back, and commit the edits to the proper branch? ...

Can I pull only certain files from another git repository?

For instance, suppose I have Repository 1 and Repository 2. Repository 1 has a file /a/b/c/d. Would it be possible for me to import this file into Repository 2 as /e/f/g/h? The reason being that I want to pull in changes from an experimental branch from a different git repository. I tried merging everything together, but there were a...

Branch descriptions in git

Is there a way in git to have a 'description' for branches? While I try to use descriptive names, working for a while on a single branch sometimes dampens my memory of why I made some of the other topic branches. I try to use descriptive names for the branches but I think a 'description' (short note about the purpose of the branch) would...

Ponderings of a Subversion User: What is a "branch" in Mercurial terms?

I'm a Subversion user, and I think I've got my head mostly around it all now. So of course now we're thinking of switching to Mercurial, and I need to start again. In our single repository, we have the typical branches, tags, trunk layout. When I want to create a feature branch I: Use the repo browser to copy trunk to branches/Featu...

Merging existing git branch with formerly unknown SVN

My project I am working on is version controlled under SVN. I had to do a large number of refactorings. For this purpose I took my workspace and created a new git repository. Afterwards I made the refactorings and committed to my local git repository as often as possible, made branches etc.. Meanwhile someone made commits to the SVN. No...

how to suggest gcc compiler more probable branch

Example: if (almost_always_false_condition) { // do something } Is there a way to suggest compiler that in 99% condition will be false. The condition calculation takes ~60 cycles to be checked, and it cannot be calculated at compile time by compiler itself. (gcc 4.3) ...

Update git-svn list of remote branches

When I have to use svn, I use git-svn to talk to svn. I cloned the repo with the standard git svn clone -s line, and all the remote branches at the time were there. Since then, a new branch has been created, but not by me. I want to checkout/track this branch locally. I can track a branch that I can see (with git branch -r) like so: gi...

Git - push to a remote-tracking branch in the remote repository

When simply doing git push to a remote repository, its master branch gets updated. This is undesirable in the case of non-bare repositories, and the warning message displayed by recent Git versions makes that clear. I'd like to be able to push to a remote repository, and have one of its remote tracking branches be updated. Later, when I...

How do revert a local branch back to how it is in github?

I did a bit of development against the wrong branch in my local repository. I did a git branch without next doing a git checkout. The commands look something like this: #On branch development git branch release-v0.2.0b # changes and several commits git push origin release-v0.2.0b And that's when I realized I was working on the wrong...