merge

Can git merge upstream changes both to a file and a copy within a repository?

Is there a way to copy a file (or subdirectory) within a git repo and have git merge upstream changes to both copies? Randal Schwartz mentions that git can do this (27 minutes into this Google Tech talk: http://www.youtube.com/watch?v=8dhZ9BXQgc4 ) Background: I'm using git to track and update CMS software---i.e., I have the CMS in a ...

Undo an hg push (backout?)

I made a big oops, and could use some help undoing it. We have two repositories-a fairly stable repository, and a repository we're working on changes in. I just made a defect fix in our stable repository, and was moving it up to the working repository. I pulled from the stable repository, merged, then accidentally pushed to the stable...

need help grouping a php array

hi all, i've got a mysql query which spits out the following array: Array ( [0] => stdClass Object ( [item1] => foo 0 [item2] => bar 0 [catid] => 3 ) [1] => stdClass Object ( [item1] => foo 1 [item2] => bar 1 [catid] => 7 ) ...

How to merge 2 associative arrays in PHP ?

Example: $arr1 = array('a' => "1", 'b' => "2", 'c' => "3", 'z' => "4"); $arr2 = array('a' => "9", 'b' => "8", 'c' => "7", 'd' => "6", 'e' => "5"); Output: $result = array('a' => array( 'f1' => "1", 'f2' => "9"), 'b' => array( 'f1' => "2", 'f2' => "8"), 'c' => array( 'f1' => "3", 'f2' => "7"), ...

How is the Change.MergeSources Field Populated in TFS?

We'd like to generate build notes with the following format: 1) Associated ChangeSets: 2) - ChangeSet 45241, by Joe: "Patching fix for foobar" 3) 'Foo.cs' integrated from dev v. 22 to qa v. 7 4) 'Bar.cs' integrated from dev v. 9 to qa v. 3 So far, we have a custom build step that accomplishes 1) and 2). It looks at the info...

Subversion post-merge tree conflict - "local delete, incoming edit upon merge"

Dear stackers, I did a merge between the trunk and a branch. On the trunk, there is a folder, let's say templates/Toto. On the branch, everything but the folder Toto is there (not a local delete, Toto is simply not in the repo). After I performed the merge (I tried several times), I always end up with a freaking tree conflict "local ...

Java NIO for merging sorted files?

I have a bunch of text files on disk, each one is just a sorted list of nonnegative integers, newline delimited: 2 14 67 134 654 1130 My files are pretty big - they can easily contain hundreds of millions of numbers. I want to write a Java program to read each of these files and write out a new text file containing all of the numbers ...

How to merge to a revision using VisualHG

This one should be easy, however, it has escaped me: Is there a way to merge revisions using VisualHG? I know I can resort to TortoiseHg, but I wanted to merge from within Visual Studio. Thanks a lot! ...

Merge two results in a MySQL query if the records are related by a field value

We have a products table. Users can create new products as copies of existing products. Instead of simply duplicating this data, we're thinking in order to minimize database size, we would store only the differences from the "parent" product. (were talking thousands of products) My thinking is that, for each new "child" product, we cre...

Sql server bulk insert/update vs MERGE in insert or update scenario

Hi. I need to find the best way to insert or update data in database using sql server and asp.net. It is a standard scenario if data exist it is updated if not it is inserted. I know that there are many topic here about that but no one has answered what i need to know. So my problem is that there is really no problem when you update/in...

TFS Simple Merge Issues

It seems as though my scenario is about as simple as it can get. I have Main and a branch called Dev. I picked a directory in Dev that has only my code and did a Merge (based on all changesets up to a specific changeset. First question, does it immediately checkin the merge, or I should do a checkin right after that? I ask because o...

WPF Datagrid update from background thread

I have a WPF Datagrid with the .ItemSource set to a Datatable. In a background thread, a new Datatable is generated, and needs to be added to the binded Datatable. When i do CurrentTable.Merge(NewTable) from the UI thread, the whole UI freezes for a couple of seconds (since there are so many rows to be added). When I do CurrentTable.Me...

How to get p4v -merge to diff multiple files

In this question: http://stackoverflow.com/questions/42980/how-to-use-p4merge-as-the-merge-diff-tool-for-mercurial, Adam Rosenfield suggested to use launchp4merge to diff multiple files in OSX such that there is only a single copy of p4v running. Is there an equivalent for linux? I ran p4v -merge -h and saw that it does not accept more ...

git checkout certain files despite conflict

I frequently find myself wanting to checkout only certain files in a tree but cant because I have modified them locally and dont want the hassle of trying to figure out merge (I dont want to merge anything - I just want the git version of certain files). So how can I force a checkout of, for example, "db-backup*" where these files are s...

Overlaying short video files on Linux? (ffmpeg)

Does ffmpeg or any other tool support merging/overlaying (not concatenating) of video files? I am trying to avoid frame-by-frame image merge into final video. ...

git revert merge - neither mainline looks correct

I am trying to revert a faulty merge, but the revert changes from both commands do not look right. This is how I made the merge commit: # merge master into branch: git checkout branch git merge master # resolve conflicts git commit git push Now I want to revert that merge with: git log b2e commit b2e... Merge: de9... cf4... git ...

MySQL Merge tables - high-traffic and large amounts of data

My work currently uses MySQL (MyISAM) exclusively for all data storage. We currently have over 300 webservers and about 150 databases. Unfortunately I'm in a position to have to write a table structure to support over 100 million rows in a 30 day period. The idea is: High volume inserts (no updates or deletes and always at the end of t...

Maven dependency management

Our project has a dependency like <dependency> <groupId>apollo.components.cots</groupId> <artifactId>cots-wfs</artifactId> </dependency> And as far as I understand, maven2 will get the latest artifact for cots-wfs, say <version>2.3-20101111.000000-13</version> The problem is, when we branch the project, the dependency sta...

Do I need to checkout both TRUNK and BRANCH to merge branch back into trunk

Having an issue, here is the problem. Created a branch from the trunk, made changes to the branch on local dev box, committed changes and now I want to merge my changes in the branch to the trunk. I run the command: 46 is the version where I created the branch, 49 is the branch version now sudo svn merge -r 46:HEAD http://path/to/bran...

TFS - Merge after Directory Rename or Add

We created Main with two subdirectories, BizTalk and WebServices. Then we branched Main to Dev. Our webservice developer (long gone) either renamed WebServies to WCFServices or deleted WebServices and added WCFServies. Now, when I attempted to Merge WCFServices, there is no item to pick on the drop down for the "Target Branch". Ho...