站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
Gallery1:Developer Guide
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== Branches and Release Versions == Collaborative development is an exercise in trust and restraint. Remember that you're making changes concurrently with other developers and that we're planning releases around current and future changes. In order to manage risk and increase reliability, we have a policy for when and where you can commit changes. It's in the best interests of the team for you to follow these rules. As a developer, you will be assigned an area of responsibility (in this case Gallery 1, or possibly Gallery Remote). You can freely commit changes, improvements, etc. into the '''trunk''' branch of your area without checking with other developers. Since many people track Gallery from Subversion (we especially get a lot of beta testers using the repository), you should make great effort to leave the '''trunk''' in a ''working state'' at all times and heavily test changes that may lead to data corruption. If you feel like your work may lead to data corruption, or have any doubts at all, please first create your own private branch and do your work there. When your code has reached stability, you can merge '''trunk''' into your branch, make sure the merge was clean, and then merge everything back down into the '''trunk'''. === [http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.copy.html svn copy] === To familiarize yourself with Subversion branches properly, you should read the [http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html Branching and Merging] chapter from the O'Reilly ''[http://svnbook.red-bean.com/nightly/en/index.html Version Control with Subversion]'' book. You might also be interested in the <tt>[http://www.dellroad.org/svnmerge/index svnmerge]</tt>, a small Python script which can help to simplify the <tt>svn merge</tt> command for you. A typical Gallery branch example follows, using <tt>svnmerge</tt> to keep track of revisions. Subversion uses real directories to store its branches. You should place your branches outside of your main '''trunk''' development directory. In the example here, your branches will live one directory level up from your '''trunk''' checkout. Then you're ready to '''copy''' the trunk into your new development branch: '''you@yourbox:~/code>''' cd my_gallery_trunk_directory '''you@yourbox:~/code/my_gallery_trunk_directory>''' cd .. '''you@yourbox:~/code>''' svn copy <nowiki>https://svn.sourceforge.net/svnroot/gallery/trunk/gallery</nowiki> \ <nowiki>https://svn.sourceforge.net/svnroot/gallery/branches/MY_DEVEL_BRANCH</nowiki> '''you@yourbox:~/code>''' svn checkout <nowiki>https://svn.sourceforge.net/svnroot/gallery/branches/MY_DEVEL_BRANCH</nowiki> '''you@yourbox:~/code>''' Using <tt>svnmerge</tt> is simple and makes tracking your revisions easy. Before you start on your new branch, you can '''init''' <tt>svnmerge</tt>, which will start keeping track of changes. Now you're ready to make changes and '''commit''' back just like you're used to: '''you@yourbox:~/code>''' cd MY_DEVEL_BRANCH '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svnmerge init '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' ''... make your changes in your branch...'' '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svn commit Committed revision '''123'''. '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' Now it's time to '''merge''' your branch changes back into the trunk. There are a couple of methods to doing this. One (not shown here) is to merge only over the revisions to the '''trunk''' made since either your initial branch or since your last merge. This is simple enough if your branch has a short lifetime. But more than likely, you'll want to keep your branch in sync with the '''trunk'''. You only want to merge your branch in over the revisions since the last merge you made. The <tt>svnmerge</tt> script helps out so you don't need to remember which versions need to be merged against. So first you want to bring your branch "in-sync" with the '''trunk''': '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svnmerge avail 94-117 '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svnmerge merge U file/changed/in/trunk.php C file/changed/in/trunk/and/your/branch/with/a/conflict.php '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' === [http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.diff.html svn diff], <br>[http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.resolved.html svn resolved] === Uh oh so we have a conflict in one file which needs to be resolved. You can inspect the conflicts with <tt>svn '''diff'''</tt>. Then you can manually clean up the conflict in the file, and then '''resolve''' the file as fixed: '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svn diff file/changed/in/trunk/and/your/branch/with/a/conflict.php ''needs more commentary here...'' '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svn resolved file/changed/in/trunk/and/your/branch/with/a/conflict.php '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' svn commit Sending file/changed/in/trunk.php Sending file/changed/in/trunk/and/your/branch/with/a/conflict.php Transmitting file data ... Committed revision 118. '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' === [http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.merge.html svn merge] (managed by [http://www.dellroad.org/svnmerge/index svnmerge]) === Now that your branch is "in-sync" with the trunk, it's time to '''merge''' your branch back into the trunk and '''commit''' the new changes. First you want to go back to your local trunk copy. '''you@yourbox:~/code/MY_DEVEL_BRANCH>''' cd ../my_gallery_trunk_directory '''you@yourbox:~/code/my_gallery_trunk_directory>''' svn update At revision 118. Since you know your branch is also up-to-date with that version, you can simply merge the branch to the head at the same revision. '''you@yourbox:~/code/my_gallery_trunk_directory>''' svn merge <nowiki>https://svn.sourceforge.net/svnroot/gallery/trunk/gallery@118</nowiki> \ <nowiki>https://svn.sourceforge.net/svnroot/gallery/branches/MY_DEVEL_BRANCH@118</nowiki> U albums.php U classes/AlbumDB.php '''you@yourbox:~/code/my_gallery_trunk_directory>''' svn status M albums.php M classes/AlbumDB.php '''you@yourbox:~/code/my_gallery_trunk_directory>''' svn commit Sending albums.php Sending classes/AlbumDB.php Transmitting file data ... Committed revision 119. '''you@yourbox:~/code/my_gallery_trunk_directory>''' As we approach the endgame of a release, we will fork off a new branch for that release (e.g. ''BRANCH_1_3_4'' for Gallery 1, or ''BRANCH_GR_1_1'' for Gallery Remote). At this time, the '''trunk''' will roll forward to the new release number (e.g. 1.3.5-cvs-b1) and you're free to commit as usual to the '''trunk'''. Changes to the release branch are restricted and are under control of the team lead in charge of the release. The correct strategy is to commit changes to the '''trunk''', and only when directed by the release team lead can you merge your changes into the release branch. This gives us a reliable, predictable path to the release where we can control which fixes go in and which ones don't. When a final release ships, the person leading the release will tag the module so that particular release can easily be reconstructed from the Subversion repository. The naming convention for these tags is ''RELEASE_1_3_4'' for Gallery 1 (''RELEASE_GR_1_1'' for Gallery Remote). In Subversion, the method for syncing to a tag is identical to syncing of a branch. Each tag has its own directory (under the <tt>tags/</tt> directory, just like branches living under <tt>branches</tt>/), the only difference from a branch being that tags do not receive updates via commits.
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)