branch

SVN and code shared between several projects

I have multiple projects in SVN. Each of these project sits in it's own trunk and branched for releases. And there is a shared code which is used in each project. The question is what is the best way to handle the code. Let me give couple of scenarios and the issues related to them a) Put the shared code in separate trunk (or reposito...

Local branches with Bazaar?

I've been playing around with Git recently to get a grasp of distributed version control. Now I'm looking at Bazaar, but can't figure out how to make a local branch, i.e. a branch that I do not have to push to when I want to commit changes. With Git, I would do git branch branch_name or git checkout -b branch_name I can then work in ...

SVN: Moving repository trunk to another's branch (with history)

I'm working with an SVN setup with a lot of repositories. I'm trying to consolidate some by moving the trunk of one into the branch of another (the old ones are themed versions of the new one, minus some code fixes I'll be applying later, so it makes sense to me). Short version, I want to go from RepositoryA/trunk to RepositoryB/branches...

Technique for determining if an integer sequence can be generated without branches?

If you're optimizing for an architecture on which branching is expensive (say the PS3's cell processor), it can be important to be able to determine whether or not you can express a given algorithm without using branches or at least using fewer branches. One pattern that I see a lot in unoptimized code is a bunch of if's used to tweak a...

Pros and cons of different branching models in DVCS

The Big Three of distributed version control (Git, Bazaar, and Mercurial) each treat branching fairly differently. In Bazaar, for example, branches are separate repos (actually, divergent copies of the parent repo); on your file system, different branches live in different directories. In Git, on the other hand, you can have multiple bra...

Mercurial: Why would you maintain separate branches/versions of software in separate cloned repos rather than with tags?

I'm looking at the mercurial handbook, chapter 6 "Working with multiple branches". In there the author states that if you have separate versions/branches of the same software that it makes sense in an implied obvious way to host each branch of the software in a separate repository. I know that Mercurial supports tags (which is the way t...

Git merge from a specific folder only.

OK, here's my problem, let me try to make it all make sense... I've created a rails website for client X. I now have a client, Y, who wants a website that does the exact same thing as client X, but with a different skin. Rails was perfect for this since all the skinning was in it's own folder and set apart from all the business logic. ...

When is the reintegrate option really necessary?

If you always sync a feature branch before you merge it back, why do you really have to use the --reintegrate option? The Subversion book says: When merging your branch back to the trunk, however, the underlying mathematics is quite different. Your feature branch is now a mishmosh of both duplicated trunk changes and private branch ...

Git merge and resolve any conflicts to current branch.

So I have my master branch, along with branch 'bob'. I've made many changes in both and now I want merge master into bob to keep him updated. The only thing is, if there is a conflict I want it to automatically resolve to bob. I've been recommended the following: git checkout bob git merge master -s ours This does not work because I...

Branching without branches

This might seem like a weird question, but bear with me. I'd like to (ab?)use git for a little project I'm working on, where I'd like to branch a file, yet keep the branched file within the current branch under a new name, maintaining history (allowing me to rebase changes to the original). This is similar to Subversion I suppose, in th...

Git pull certain branch from github.

I have a project with multiple branches. I've been pushing them to github, and now that someone else is working on them i need to do a pull from github. It works fine in master. But say I have branch xyz. How can I pull branch xyz from github and merge it into branch xyz on my localhost? I actually have my answer here: http://stackoverf...

Problem in SVN merging branches into trunk

I have a trunk (A) and two branches (B and C). When I merge A with C its OK, after I merge A with B, the previous C its overwriten and my trunk don't have the C changes. What I want is A + B + C into trunk after merges. Edited for more explanation: In trunk I have 3 files: "FILE 1", "FILE 2" and "FILE 3"; I create a branch from trunk...

Using Git, show all commits that are in one branch, but not the other(s)

I have an old branch, which I would like to delete. However, before doing so, I want to check that all commits made to this branch were at some point merged into some other branch. Thus, I'd like to see all commits made to my current branch which have not been applied to any other branch [or, if this is not possible without some scriptin...

Any tools to analyze divergent code, get it into sourcecontrol (Subversion)

Say you take over some code that exists in different versions, no sourcecontrol (possibly some backups). Are there some tools that let you analyze relationships (more than diffs), or let you reconstruct history in sourcecontrol? If you load it into Subversion, can you do better that to designate the best version as base-version, and th...

How to merge a branch to another branch in GIT?

Let me explain the problem in detail. I have a main git branch on which I created a new side branch bug10101010, now I wan't to merge the bug10101010 to main. So far everything is good. Now I have a different branch of the same product, named legacy. I wan't to merge the bug10101010 to the legacy branch in GIT. Any ideas? I can't just...

Does an Eclipse CVS merge appear in the log view of a file?

Hi, all. I'm not new to the Branch/Merge idea, but I'm new to CVS. I have a sample file that I have brached off of the main trunk, and have made non-conflicting edits to both the branch and the main. When I go to Merge, however, the process leaves me with all of my changes in a file representing the latest revision of the Main trunk. ...

git: merge a portion of one branch's source tree into another, regardless of individual commits

I understand how to merge branches together in git, and I love how easy it makes it. I have a branch that looks like this: project/ |--subproj1/ | |---(files) | |--subproj2/ |---(files) A colleague has a branch that's made significant changes to both subprojects. More specifically, he's altered them both to depend on a common bit...

How are git branches imported into mercurial with hg convert?

I have a number of branches in a git repository: david@Panama ~/app: git branch -r origin/HEAD -> origin/master origin/master origin/newButtons origin/newFonts origin/serverView If I try and import this git repo into mercurial: david@Panama ~/: hg convert app ... david@Panama ~/app-hg: hg update 388 files updated, 0 files merged, 0...

How can I find out which files have been modified in a branch?

I have two branches: master and bug1. I checked out bug1, did bunch of changes and multiple commits. How do I get a list of all files that were changed on the branch? I'm not interested in hashes, dates or any other commit related details. I just want to get a simple list of touched files. ...

How to create branch for the single file?

Hi community, I have a product which comes in two versions, and up to now I was able to manage the differences between them only using compiler flags and #ifdefs. Now I want to have a separate icon for each of the product. The rest of the codebase, including source referencing the icon file remains the same. I want to keep these develop...