merge

Git merge of same and externally modified file

I have inherited some code (from zip file) from a developer and git initialzed, made changes and set of check-ins progressively. Now, the same developer released the same code with his changes and gave me the another zip file. How do i merge my changes which i have it my git repo and his recent changes from the second zip file conten...

Diff/Merge functionality for objects (not files!)

I have a collection of objects of the same type, let's call it DataItem. The user can view and edit these items in an editor. It should also be possible to compare and merge different items, i.e. some sort of diff/merge for DataItem instances. The DIFF functionality should compare all (relevant) properties/fields of the items and detect...

Merge a hash with the key/values of a string in ruby

Hi there, I'm trying to merge a hash with the key/values of string in ruby. i.e. h = {:day => 4, :month => 8, :year => 2010} s = "/my/crazy/url/:day/:month/:year" puts s.interpolate(h) All I've found is to iterate the keys and replace the values. But I'm not sure if there's a better way doing this? :) class String  def interpolate...

2 large databases - worth merging into 1?

I have 2 large databases that were sharded before. I now have removed the sharding and have created a new database with all of the data except for the tables that were originally sharded. Is it worth importing this data into the new database, or keeping them as seperate entities that I can just scan through? We are talking around 60mi...

What are the differences between GIT and SVN when it comes to merge conflicts solving.

I keep hearing that branching in git is so much easier than in SVN, because it's easier to merge the branch back to trunk/master. I've read some tutorials, but they only covered basic merge conflicts ("Alice changed line 8 of code.cpp and at the same time Bob changed line 8 of code.cpp...") and there are no differences between SVN and al...

Synchronising tables across remote Access databases

Hi folks, I'm helping out a business by providing an Access DB to manage requests of various types. As they are a construction company, they have one machine in an 'office' on the building site, plus 3 based in their main office. The machine on site has no internet connectivity. Is there any (reasonably simple) way to synchronise the o...

PHP: Filling in the 'gaps' in an array

Hey gurus, I've got a php array (obtained through checkbox values in a form - as you know checkboxes only show up in the _POST variable when they are not set). Array ( [2] => 0,2 [3] => 0,3 ) I need a way to 'fill in' the gaps between the range 0-5. So above would look like (filling the empty spaces with '-1'. I tried array_m...

How to abandon a hg merge?

I'm new to collaborating with Mercurial. My situation: Another programmer changed rev 1 of a file to replace 4-space indents with 2-space indent. (I.e. changed every line.) Call that rev 2, pushed to the remote repo. I've committed substantive changes rev 1 with various code changes in my local workspace. Call that rev 3. I've hg pull...

How to sort in-place using the merge sort algorithm?

I know the question is not too specific. All I want is someone to tell me how to convert a normal merge sort into an in-place merge sort (or a merge sort with constant extra space overhead). All I can find (on the net) is pages saying "it is too complex" or "out of scope of this text". The only known ways to merge in-place (with...

SVN merge loses files and code

Hi. I'm trying to merge trunk change-set into a branch, but have found out a lot of post-merge issues, including whole files that disappeared, and missing code blocks I'm using SVN 1.6 for both clients and server. Tried this with multiple clients - Eclipse, Netbeans and SVN - the result is the same. Can someone advice how sort it out,...

merge 2 php arrays which aren't of the same length by value

Excuse me if this has indeed been asked before, I couldn't see anything that fitted my needs out of the dozens of similar titled posts out there ;) I'm trying to merge 2 php arrays which aren't of the same length, and merge them on a value that exists from identical key => values within both arrays. My first query produces an array fro...

Git: delete files in a branch, what happens when a merge takes place

I'm relatively new to source control (at least complex source control). If I'm developing a set of features in a branch, and I happen to delete some cruft out of the source tree in this branch, what happens when I merge? Are the files properly deleted in the trunk/master? Is there anything I should avoid doing that is typically problem...

CM and Agile validation process of merging to the Trunk?

Hello All, We are a new Agile shop and we are encountering an issue that I hope others have seen. In our process, the Trunk is considered an integration branch; it does not have to be releasable, but it does have to be stable and functional for others to branch off of. We create Feature branches of the Trunk for new development. All wo...

how to merge multiple url/path into multidimensional array ?

I have array like this: $path = array ( [0] => site\projects\terrace_and_balcony\mexico.jpg [1] => site\projects\terrace_and_balcony\new_york.jpg [2] => site\projects\terrace_and_balcony\berlin.jpg [3] => site\projects\terrace_and_balcony\Kentucky.jpg [4] => site\projects\terrace_and_balcony\Utah.jpg [5] => site\projects\terrace_and_bal...

cvs - catch newly added files while merging forward from a tag?

In our usage, we branch for development and merge from time to time upwards. For example, branch A and B, develop on A and B for some time, then merge A to B. More than one merge occurs from A to B so we use merging point tags so that we only merge from A.X to B. The problem is that newly added files don't get tagged. So, if a file was...

Fogbugz Duplicate Cases

I am using FogBugz free hosting to manage my project bugs, I also have several customers I create custom software for, been using FogBugz to keep everything organized. Question I have is, there are times where they send me an email with a bug, so I report it in my system and they create it as well, instead of having 2 cases of same bug,...

groovy, merge two lists : listA is [[Name: mr good, note: good, rating:9], [Name: mr bad, note: bad, rating:5]]

I have two lists: listA: [[Name: mr good, note: good,rating:9], [Name: mr bad, note: bad, rating:5]] listB: [[Name: mr good, note: good,score:77], [Name: mr bad, note: bad, score:12]] I want to get this one listC: [[Name: mr good, note: good,, rating:9, score:77], [Name: mr bad, note: bad, rating:5,score:12]] how could I do it...

How to merge two icons together? (overlay one icon on top of another)

I've got two 16x16 RGB/A .ICO icon files, each loaded into a separate System.Drawing.Icon object. How would you create a new Icon object containing the merge of the two icons (one overlaid on top of the other)? Edit: I probably wasn't too clear, I don't want to blend two images into each other, I want to overlay one icon on top of an...

Atomic INSERT/SELECT in HSQLDB

Hello, I have the following hsqldb table, in which I map UUIDs to auto incremented IDs: SHORT_ID (BIG INT, PK, auto incremented) | UUID (VARCHAR, unique) Create command: CREATE TABLE mytable (SHORT_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, UUID VARCHAR(36) UNIQUE) In order to add new pairs concurrently, I want to use t...

How to compare 2 lists and merge them in Python/MySQL?

I want to merge data. Following are my MySQL tables. I want to use Python to traverse though a list of both Lists (one with dupe = 'x' and other with null dupes). This is sample data. Actual data is humongous. For instance : a b c d e f key dupe -------------------- 1 d c f k l 1 x 2 g h j 1 3 i h u u 2 4 u r t 2 x ...