svn rebase and merge
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:igno
[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
查看版本的tags:
http://svn.ea.mot.com/
Developer--->>>WebSVN-->> bsg/__>>tags/
svn merge 不同的目录,有冲突的时候,可以添加 --ignore-ancestry
Svn replace file and dir;
deadwood
In order to keep bsg/branches clean and also as an effort to make sure no commits are made on branches which are 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 merge changes into a file which has been moved
cd <target component>
svn merge --ignore-ancestry component>@<r1> component>@<r2> .
What to do about a conflict in an svn:mergeinfo property?
This is how 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 has 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 are scripts in /home/tools/bin (http://svn.ea.mot.com/dev/devtools/trunk) that allows you to use it together with svn merge like this (make sure you can show X output on your screen, download Xming if in Windows):
--record-only
Leo, you can do the following on the merge branch to only record that a merge has been done without doing it.
This will skip that revision when merging a larger span where that revision is included then.
svn merge --record-only -c<rev> http://svn.ea.mot.com/dev/bsg/DIGITALIS_teliasvn commit -m "Blocked
This may lead to a situation where you have to run the merge command several times when doing the actual merge.
Since svn will divide the merge in to several intervals (between the skipped revisions), and will stop after a conflict is found in a merge interval.
When merging, this this command is useful to see that you have merged (and blocked) so far (run from the root of the branch)
svn pg svn:mergeinfo . | grep /DIGITALIS_telia:
extern merge:
查看externals属性
[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 .
编辑externals属性:
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:
查看ignore属性
[chkq76@brora DIGITALIS_telia_merge]$ svn propget svn:ignore products/ip-stb/boot_image/custom/
*.bmp
编辑 ignore属性
export SVN_EDITOR=vi && svn propedit svn:ignore products/ip-stb/boot_image/custom/
若想创建了一个文件夹,并且把它加入版本控制,但忽略文件夹中的所有文件的内容:
$ svn mkdir spool
$ svn propset svn:ignore '*' spool
$ svn ci -m 'Adding "spool" and ignoring its contents.'
若想创建一个文件夹,但不加入版本控制,即忽略这个文件夹:
$ mkdir spool
$ svn propset svn:ignore 'spool' .
$ svn ci -m 'Ignoring a directory called "spool".'
若已经创建了文件夹,并加入了版本控制,现在想忽略这个文件夹,但要保持文件夹的内容:
$ 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 you please 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 are not the first one or not in merge time 05:00-17:00 CST (23:00-11:00 CET), you must wait till the two conditions are 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, here 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 version(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, you must change the conflic file(xxx) code and run the command: svn resolved xxx to remove conflic
冲突解决后: svn resolved xxx
查找冲突: svn st | grep "C "
revert掉所有修改/rebase的文件: svn revert -R * 之后要用svn-clean
清理掉所有非svn 文件: svn-clean
$svn st | grep "C "
! C patches
C applications/3pp/ekioh-webkit/proprietary/patches/use_clipped_blits.patch
C applications/3pp/ekioh-webkit/proprietary/patches/ektimer.patch
C applications/3pp/ekioh-webkit/proprietary/patches/busyloop.patch
C applications/3pp/ekioh-webkit/opensource/patches/fix_is_plugin_view.patch
$ svn info patches 查看冲突信息
$ svn info applications/3pp/ekioh-webkit/proprietary/patches/use_clipped_blits.patch 查看冲突信息
5) Queue a build of ITEM_P1826 with high priority(9 is the highest now, it's better use fedora 10 and 11 build server now), and wait it building OK
6) Test your item function and smoke test related functions with the bootimage of ITEM_P1826 after rebase.
7) Merge ITEM_P1826 back to trunk and remember the merge back version(117940)
a: cd /extra/trxc47/trunk
b: svn merge http://svn.ea.mot.com/dev/bsg/trunk@117928 http://svn.ea.mot.com/dev/bsg/branches/ITEM_P1826@117939
c: svn ci -m "ITEM:P1826(set /etc/TZ through kreatv-option-tz for uclibc)merge back to trunk. Merge(http://svn.ea.mot.com/dev/bsg/trunk@117928 http://svn.ea.mot.com/dev/bsg/branches/ITEM_P1826@117939 )" hal/iips/options/ products/ip-stb/boot_image/vip2262ft
Note: in step c, it is better to just merge back the foler(here is hal/iips/options/ and products/ip-stb/boot_image/vip2262ft) your changed to trunk, as this will avoid changing other unrelated folder by mistake and unused merge info.
And if you want to change the commited merge comments, use the merge back version(117940):
a:export SVN_EDITOR=vi && svn propedit --revprop svn:log -r 117940 http://svn.ea.mot.com/dev
b:edit the merge commit info, save and exit vi
8) Remove your merge item in wiki queue, if not only your one, it's better to change the order after yours
BUGZ:13861 Fixed. DLNA: It takes up to 10 seconds for lpcm audio to start after pause play
revert all svn changed file and directory.
svn st | grep M | xargs svn revert
AAAA merge info
I think it may have something to do with mergeinfo.Running:svn pg -r195041 svn:mergeinfo $BSG/branches/DEV_telia42_overblue | grep /trunk:Gives:/bsg/trunk:188473-194872
This means that any revisions of a merge from trunk in the interval 188473-194872 will be skipped,if you have checked out a revision after the r194901 rebase.If you instead, like Heidi, check out a revision like r194894 which is prior to the merge, the r193370:r194872 revisions will not be skipped when merging.So the only problem was in the rebase, somehow the mergeinfo was correctly updated, but some directories and files were not.
Hi,I run #svn pg svn:mergeinfo | grep /BRASSICA:/bsg/branches/BRASSICA:149724-176907,177917-178282,178997-179883,180639-180669I think it should be a continuous interval here (if all revisions have been merged or permanently skipped)
BBBBBB
Trunk entry checklist
Use this list to check that you have fulfilled trunk entry criteria. Details: look atMergeQueue. http://wiki.mot-mobility.com/bin/view/KreaTV/MergeQueue
- KATT system level tests?
- Rebased?
- Automatic build?
- Smoke tests?
- KATT regression level tests?
- Merge (details: check SvnMergeToTrunk)
- Changed makesystem or common/kattscripts externals?
- Only changed your files? svn st |grep -v " M"
- Only your changes? svn diff |filter-mergeinfo
- No replaced files? svn status | grep '^R'
- Commit message with new functionality, fixed/known bugs (BUGZ:xxxxx), items (ITEM:Pxxxxx) and merge points inMERGE() syntax.
- Step out of queue.
- E-mail next person.
- Deadwood.
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)