HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] how to merge manual



On Aug 2, 2011, at 7:39 AM, Nathan W. Panike wrote:

On Mon, Aug 01, 2011 at 11:39:00PM -0500, Peter Keller wrote:
On Mon, Aug 01, 2011 at 10:47:19PM -0500, Nathan Panike wrote:
And you only get conflicts if you and another team member have made changes
to the same part of a document or code. 

That's not true.

For example, if I want to do: V7_6_0-branch -> V7_6-branch -> master

And I do it this way, which is our recommended way:

git branch status
* V7_6_0-branch
git pull
git push origin V7_6_0-branch
git checkout V7_6-branch
git pull
git merge V7_6_0-branch [no conflicts]
git push origin V7_6-branch
LABEL_A
git checkout master
git merge V7_6-branch [BOOM! Conflicts in the src through my fault or other.]
fix conflicts, retest, could take hours.
git add (piles of crap)
git commit -m "Merged V7_6-branch into master"
git pull
git push origin master


Why is it the recommended way?  It is stupid.

What I do:

BEGIN # Set up once, not every time
git config remote.origin.push V7_6_0-branch:V7_6_0-branch
git config remote.origin.push V7_6-branch:V7_6-branch
git config remote.origin.push master:master

START
git config remote.origin.push 
git checkout V7_6-branch
git merge V7_6_0-branch
git checkout master
git merge V7_6-branch
git push --dry-run origin # To check whether it will work
# If not, fetch, reset master and V7_6-branch, then rebase V7_6_0-branch;  goto START
git push origin

I don't see much of a difference. One advantage with your sequence is that if your merges produce conflicts that take a while to sort out, someone else who attempts to merge the same branches at the same time won't run into the conflicts.

If the dry-run push fails due to someone else updating master, I assume you would only reset master and re-do that merge. That way, you don't have to re-resolve any conflicts in the first merge.

I presume you're checking the 'git config remote.origin.push' command's output to ensure that the branches you're merging are in the list and nothing else is.

We've discouraged use of 'git push' without specifying a branch, as people have had things get pushed on other tracking branches that they didn't intend. A better solution for that may be to tell people not to put stuff on a tracking branch that they're not prepared to push.

+--------------------------------+-----------------------------------+
|           Jaime Frey           | I used to be a heavy gambler.     |
|       jfrey@xxxxxxxxxxx        | But now I just make mental bets.  |
|                                | That's how I lost my mind.        |
+--------------------------------+-----------------------------------+