SVN rebase and Merge

Source: Internet
Author: User
Tags commit mkdir svn
SVN rebase and Merge

[Chkq76@chieftec dev_youtube_4_4]$ SVN Pl.

eosu@leosu:/mnt/sda3/dev_iptv/digitalis_telia_merge$ svn proplist.

Properties on '. ':

Kbs:logfilter

Svn:ignore

Svn:externals

Kbs:interface_dirs

Svn:mergeinfo

Kbs:products


[Chkq76@chieftec dev_youtube_4_4]$ SVN pg Svn:mergeinfo. >tmp.info


$SVN propget Svn:mergeinfo | grep bsg/trunk



#svn Merge--ignore-ancestry Http://svn.ea.mot.com/dev/ifc/kreatel/hai/<A>/include Http://svn.ea.mot.com/dev /ifc/kreatel/hai/branches/<branch Name>@<b>/include


Export Svn_editor=vi && SVN propedit--revprop svn:log-r 129583http://svn.ea.mot.com/dev/bsg/trunk

View version of Tags:
http://svn.ea.mot.com/
Developer--->>>WebSVN-->> bsg/__>>tags/


SVN merge different directories, when there is a conflict, you can add--ignore-ancestry




Svn replace file and dir; #svn St |grep ' R '; SVN St |grep ' R '; SVN St |grep ' C '; SVN St |grep ' C '


Deadwood
In order to keep bsg/branches clean and also as a effort to make sure no commits is made on branches wh Ich is dead, Bsg/deadwood has been introduced. 
SVN mv http://svn.ea.mot.com/dev/bsg/branches/item_ X1234http://svn.ea.mot.com/dev/bsg/deadwood







Resolving Subversion conflicts
[ User@buildserver food]$ svn st 
[user@buildserver food]$ svn st | grep m


How to M erge changes into a file which have been moved
CD <target component>
svn merge--ignore-ancestry component>@& Lt;r1> component>@<r2>.  

What does about a conflict in an svn:mergeinfo property? 
Thi S is what it would look like: ,
Conflict for property ' Svn:mergeinfo ' discovered on ' common/cpp/event/unittests '.

Meld
Install on Fedora using yum install meld.
A diff and Merge tool which can handle entire directories. It understands SVN and have a very nice handing of conflicts.
To look at SVN diffs/conflicts, simply start it with the file or directory in question as argument.

Kdiff3
KDIFF3 is a powerful merge tool. There is scripts In/home/tools/bin (Http://svn.ea.mot.com/dev/devtools/trunk) that allows the use of it together with SV N merge like this (make sure you can show X output on your screens, download Xming if in Windows):

--record-only
Leo, you can do the following in the merge branch to only record that a merge have been done without doing it.
This would skip that revision when merging a larger span where that revision was included then.
SVN merge--record-only-c<rev> http://svn.ea.mot.com/dev/bsg/DIGITALIS_teliasvn commit-m "Blocked

This may leads to a situation where you have to run the merge command several times when doing the actual merge.
Since SVN would divide the merge in to several intervals (between the skipped revisions), and would stop after a conflict is Found in a merge interval.

When merging, this this command was useful to see which you had merged (and blocked) so far (run from the root of the Branc H
SVN pg Svn:mergeinfo. | Grep/digitalis_telia:

extern Merge:

View Externals Properties

[Chkq76@brora Dev_telia42_overblue] $SVN propget svn:externals
Makesystem Http://svn.ea.mot.com/dev/make/makesystem/tags/33.1.2/makesystem


[Chkq76@brora dev_telia42_overblue]$ svn propget svn:externals.
Makesystem Http://svn.ea.mot.com/dev/make/makesystem/tags/33.1.2/makesystem

SVN propget svn:externals.

To edit the Externals property:

Export Svn_editor=vi && SVN propedit svn:externals-r 133137 Http://svn.ea.mot.com/dev/bsg/branches/BOBROV/hal /interface/hai

$SVN PE svn:externals http://svn.ea.mot.com/dev/bsg/branches/ELYMUS_work


[Chkq76@brora hai]$ pwd
/extra/leo/bobrov/hal/interface/hai
[Chkq76@brora hai]$ svn info.


[Chkq76@brora hai]$ svn propget svn:externals. Include-r 133137 Http://svn.ea.mot.com/dev/ifc/kreatel/hai/branches/BOBROV/include




extern Ignore:

View Ignore Properties

[Chkq76@brora digitalis_telia_merge]$ svn propget svn:ignore products/ip-stb/boot_image/custom/

*.bmp

Edit Ignore Properties export Svn_editor=vi && SVN propedit svn:ignore products/ip-stb/boot_image/custom/

If you want to create a folder and add it to version control, but ignore the contents of all the files in the folder:

$ SVN mkdir Spool

$ svn propset svn:ignore ' * ' Spool

$ svn ci-m ' Adding "spool" and ignoring its contents. '

If you want to create a folder, but do not add version control, this folder is ignored:

$ mkdir Spool

$ svn propset svn:ignore ' spool '.

$ svn ci-m ' ignoring a directory called "Spool". '

If you have created a folder and added version control, you now want to ignore this folder, but keep the contents of the folder:

$ SVN export spool spool-tmp

$ SVN RM Spool

$ svn ci-m ' removing inadvertently added directory "spool". '

$ MV Spool-tmp Spool

$ svn propset svn:ignore ' spool '.

$ svn ci-m ' ignoring a directory called "Spool". '



svn revert some version:

Revert http://svn.ea.mot.com/dev/bsg/branches/digitalis_telia_merge/platform/media/mediamanager@217085

#svn merge-c -217085 Http://svn.ea.mot.com/dev/bsg/branches/DIGITALIS_telia_merge/platform/media/mediamanager

Can revert your commit by creating a branch, running

"SVN merge-c -214582 http://svn.ea.mot.com/dev/bsg/trunk" on it,


Rebase and merge back to Trunk sample (item_p1826):

0) Add You merge item to East Asia queue in Http://twiki.mot.com/bin/view/KreaTV/MergeQueue
# Branch name Merge requester (name + core ID) Description
1 item_p1826 Mike Zheng hrjp48 Set timezone from config file

Notes:if you aren't the first one or not in the merge time 05:00-17:00 CST (23:00-11:00 CET), you must wait till the one con Ditions is ok!

1) Telnet remote server
SSH trxc47@benromach.ea.mot.com
Password:xxx

2) Change to your working Foler:/extra/trxc47
Cd/extra/trxc47

3) Check out or update to latest trunk and your branch, this is item_p1826
SVN Co http://svn.ea.mot.com/dev/bsg/branches/ITEM_P1826
SVN Co http://svn.ea.mot.com/dev/bsg/trunk

4) Rebase your branch to latest trunk,you must know the item_p1826 created version from trunk (117612), the latest trunk ve Rsion (117928), and the item_p1826 rebase version (117939)
a:cd/extra/trxc47/item_p1826
B:SVN merge-r 117612:117928 Http://svn.ea.mot.com/dev/bsg/trunk
C:svn St
D:verify the C result and without Conflics (c in the first line of the file)
E:SVN ci-m "Rebase to trunk 117928. (Merge-r 117612:117928 http://svn.ea.mot.com/dev/bsg/trunk) "
SVN ci-m "rebased to trunk@194872, MERGE (r193370:r194872,http://svn.ea.mot.com/dev/bsg/trunk)."

Notes:if there any conflict in B step, your must change the conflic file (XXX) code and run the COMMAND:SVN resolved XXX To remove Conflic
After conflict resolution: SVN resolved XXX
Find conflicts: SVN St | grep "C"
Revert remove all files that modify/rebase: SVN revert-r

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.