Changes between Version 1 and Version 2 of UfoRevisionControl
- Timestamp:
- Feb 19, 2011, 2:26:02 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UfoRevisionControl
v1 v2 1 1 = Repositories = 2 2 3 There was some problems with integration of GIT repositories into the 4 Trac. Therefore, I decided to install bazaar as a revision 3 There were some problems with integration of Git repositories into Trac. Therefore, I decided to install bazaar as a revision 5 4 control system: http://bazaar.canonical.com/en/. The good documentation on bazaar commands is available here: 6 5 http://doc.bazaar.canonical.com/bzr.2.2/en/ 7 6 8 7 I have installed the main repository for framework development. It is 9 accessible with following bazaar URL:8 accessible with the following bazaar URL: 10 9 {{{ 11 10 bzr+ssh://user@ufo.kit.edu/framework 12 11 }}} 13 12 14 You can create new branches with the following command. This branches will be writable by creator only, but accessible for 15 everybody else. As well the branches will immediately appear in the Trac 16 source browser. 13 You can create new branches with the following command. These branches will be writable by creator only, but accessible for everybody else. Changes to these branches will immediately appear in the Trac [http://ufo.kit.edu/ufo/browser source browser]. 17 14 {{{ 18 15 bzr init bzr+ssh://user@ufo.kit.edu/framework/branch1 … … 20 17 21 18 22 After branch initialization you can create local repository. Just call 23 'bzr init' in root of the source folder. Files can be added with 'bzr 24 add' command and revision can be commited with 'bzr commit -m some_comment'. 25 This will work with local repository on your desktop computer. To submit 26 stable revision to the server, for public use, please issue: 19 After branch initialization you can create local repository. Just call 'bzr init' in root of the source folder. Files can be added with `bzr add` command and revision can be commited with `bzr commit -m some_comment`. 20 This will work with local repository on your desktop computer. To submit a stable revision to the server, for public use, please issue: 27 21 {{{ 28 22 bzr push bzr+ssh://user@ufo.kit.edu/framework/branch1 29 23 }}} 30 24 31 Alternatively, it is possible to instruct bazaar to synchronize with the 32 server after each commit. Just bind server with the following command: 25 Alternatively, it is possible to instruct bazaar to synchronize with the server after each commit. Just bind the local branch with the server using the following command: 33 26 {{{ 34 27 bzr bind bzr+ssh://user@ufo.kit.edu/framework/branch1 35 28 }}} 36 29 37 It is also possible to create a personal repository (for whatever 38 reason). The access pattern will be the same: writable by creator and 39 readable by everybody else. However, it will not automatically appear in 40 Trac. The new repository should be first added through Trac 41 configuration page. The command: 30 It is also possible to create a personal repository (for whatever reason). The access pattern will be the same: writable by creator and readable by everybody else. However, it will not automatically appear in Trac. The new repository should be first added through the Trac configuration page. The command: 42 31 {{{ 43 32 bzr init-repo bzr+ssh://user@ufo.kit.edu/repo1/ 44 33 }}} 45 Then, the branches can be created as usual:34 initializes the repository. Then, the branches can be created as usual: 46 35 {{{ 47 36 bzr init bzr+ssh://user@ufo.kit.edu/repo1/branch1 48 37 }}} 49 38 39 To get access, please, create a ticket specifying the desired login and attaching your public key. 50 40 51 41 52 To get access, please, create a ticket specifying the desired login and attaching your public key. 42 = Possible workflow = 43 44 There are already very good branching [http://nvie.com/posts/a-successful-git-branching-model/ models] out there. Although it's up to everyone how he will work on his personal branches, I will show how I use Bazaar to ease my life. 45 46 First of all, I import some of the written code using the steps written above. Then I clean the project directory and clone the committed code as a named branch and bind to the server: 47 {{{ 48 bzr clone bzr+ssh://user@ufo.kit.edu/user/project upstream 49 cd upstream && bzr bzr bind bzr+ssh://user@ufo.kit.edu/user/project 50 }}} 51 I ''never'' work directly in the upstream branch because every commit would be visible immediatly. Therefore, I branch from the `upstream` branch a local branch where development happens: 52 {{{ 53 bzr clone upstream/ local 54 }}} 55 Whenever I need to work on the same project but tackling different problems, I branch from the `local` branch to a feature specific branch. To push my changes, I just pull (no merging needed) the changes from the `local` branch into the `upstream` branch 56 {{{ 57 cd upstream && bzr pull ../local 58 }}} 59 60 In the future we should streamline the development process as shown in the blog post: There are named branches with specific purposes, which may or may not branch from each other in order to form a coherent system. The two main branches are `master` where one commit means a release of the product and `develop` where actual development happens. `develop` branches from `master` and from there everyone in the personal branches. Release and feature branches are tempory branches to aid in preparing the release and to help organizing the development of new features. They are deleted when changes in these branches are merged back to `master` and `develop` respectively.