branching-and-merging

How do I delete a folder in a branch of TFS, but not in the main part?

耗尽温柔 提交于 2019-12-11 12:17:53
问题 We need to delete a folder in one of our branches, but do not want it deleted in the main/root repository. The deleted folder is gone in ONE older version, but the newer versions retain it, as do the older versions. I deleted it in the branch, merged to main, then in main did "undo pending changes" on that folder. The problem is each new merge to main, it wants to delete that folder again. How do I tell it to leave it in the main/root? 回答1: To prevent a changeset from being merged, you need

Subversion branching without having canonical directory structure

*爱你&永不变心* 提交于 2019-12-11 12:02:56
问题 I have a subversion repository, and I would like to create a branch, but the repository does not have the canonical directory structure of /trunk , /branches and /tags - it just has everything that should be in /trunk , in the root folder. Am I screwed, or is there some way to correct the directory structure (or to create a branch within the existing directory structure)? 回答1: Try something along the lines of $ svn mkdir $REPO/{trunk,tags,branches} $ for f in $(svn ls $REPO |grep -v 'trunk/$\

Overwriting branch with default in Mercurial

走远了吗. 提交于 2019-12-11 10:35:34
问题 Let say I had a feature branch called feature_x that was worked on, then changesets cherry-picked and transplanted to default, then the branch was closed. Not the best flow, but it's Mercurial, so there is no way of changing the history. Now I'm going to work again on the feature X, and I feel reusing feature_x branch would be least confusing. However, if I reopen that branch and merge default to it, I've got two problems. First merge conflicts, second changes that were modified in that

SVN 1.8.5 marks entire files as conflicted

China☆狼群 提交于 2019-12-11 06:23:48
问题 I am having trunk and one branch. I have updates in both and I want to merge trunk changes to branch. And all files merges correcty, but one is marked as conflict. The problem is that I cant merge them because svn marks all lines as different. How can I solve this? svn diff on that file in trunk and branch also shows all file lines as different. My server svn version: svnserve, version 1.8.5 (r1542147) compiled Jan 13 2014, 03:38:23 on i486-pc-linux-gnu My client svn version: svn, version 1.8

git: how do I find the common ancestor of two branches… that have already been merged

走远了吗. 提交于 2019-12-10 21:16:17
问题 In order to find the common ancestor of 2 git branches, one needs to do: git merge-base branch another_branch Okay. But... what if both branches have already been merged? When I use merge-base in that case, the commit I get is the latest one before the merge, and I would like to know the common ancestor from which both branches came out "before the merge". In other words: Z - A - B - C - D - E - F \ / G - H - I HEAD is at F. If I do a git merge-base here, the commit I get is I , and the one I

Baseless merge for multiple non-consecutive changesets

痞子三分冷 提交于 2019-12-10 15:58:16
问题 I'm issuing the following command to TFS: >tf merge /baseless c:\ws\source c:\ws\target /recursive /version:C100~C100 But I have a large list of changesets that need to be merged. Is there a shortcut for this, or some way to specify a list, for example: >tf merge /baseless c:\ws\source c:\ws\target /recursive /version:C100,C108,C110,C800,C1001,etc... 回答1: If powershell is an option, below script should help (not tested!): $cslist = 1,23,45,456,568 #list of all changesets foreach ($cs in

How does Mercurial merge internally?

£可爱£侵袭症+ 提交于 2019-12-10 14:10:34
问题 There is a nifty article on quora about how git does it's merging: http://www.quora.com/Git-revision-control/How-does-git-merge-work And I was wondering if such a thing existed for Mercurial. I'll admit that my motivation for this is that Mercurial seems really dumb about auto-resolving conflicts, but without concrete information about how mercurial does it's merging, I can't form an argument for Git. (Also maybe I'm crazy and the method is the same, regardless I can't find the information

Always ignore a certain commit on merge in git

社会主义新天地 提交于 2019-12-10 13:55:49
问题 I am working on my first project using git and have ran into an issue. The repo contains a a client/server app. I have a 'master' and 'test' branches, with the intent that master is always the same as what's deployed. My problem there are 3-4 places in the codebase where the server URL is stored. I want to change this in the 'test' branch, but not in the 'master' branch. The problem is, of course, that whenever I want to merge back to 'master', git wants to put this change in 'master'. I can

Git shows no merge conflicts when it should

瘦欲@ 提交于 2019-12-10 13:17:28
问题 According to my understanding of merge conflicts, a merge conflict occurs when two people have changed the same file, and/or modified the same line in that file. So when I did a git pull origin master I expected a merge conflict, since the same line was different in both the versions, but it looks like git decided to overwrite my local files. To give more information, I pushed my version on Github few days back. Then someone pulled it, worked with it, and pushed it back to github. Two of the

mercurial - see changes on the branch ignoring all the merge commits

自作多情 提交于 2019-12-09 16:19:50
问题 I have a branch that was developed for a long period of time. During the development default branch was merged into that branch several times. I would like now to review all the changes done on that branch ignoring merges, to decide whether it is safe to merge it to default. I tried hg diff -r "branch('myBranch') - merge()" but it still shows changes introduced by merges. Also tried following this How to show the diff specific to a named branch in mercurial but hg diff -r "branch('myBranch')