UbuntuWiki:UsingBZR
文章出处: |
{{#if: | {{{2}}} | https://wiki.ubuntu.com/UsingBZR }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/af | • {{#if: UbuntuWiki:UsingBZR|Afrikaans| [[::UbuntuWiki:UsingBZR/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ar | • {{#if: UbuntuWiki:UsingBZR|العربية| [[::UbuntuWiki:UsingBZR/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/az | • {{#if: UbuntuWiki:UsingBZR|azərbaycanca| [[::UbuntuWiki:UsingBZR/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/bcc | • {{#if: UbuntuWiki:UsingBZR|جهلسری بلوچی| [[::UbuntuWiki:UsingBZR/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/bg | • {{#if: UbuntuWiki:UsingBZR|български| [[::UbuntuWiki:UsingBZR/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/br | • {{#if: UbuntuWiki:UsingBZR|brezhoneg| [[::UbuntuWiki:UsingBZR/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ca | • {{#if: UbuntuWiki:UsingBZR|català| [[::UbuntuWiki:UsingBZR/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/cs | • {{#if: UbuntuWiki:UsingBZR|čeština| [[::UbuntuWiki:UsingBZR/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/de | • {{#if: UbuntuWiki:UsingBZR|Deutsch| [[::UbuntuWiki:UsingBZR/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/el | • {{#if: UbuntuWiki:UsingBZR|Ελληνικά| [[::UbuntuWiki:UsingBZR/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/es | • {{#if: UbuntuWiki:UsingBZR|español| [[::UbuntuWiki:UsingBZR/es|español]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/fa | • {{#if: UbuntuWiki:UsingBZR|فارسی| [[::UbuntuWiki:UsingBZR/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/fi | • {{#if: UbuntuWiki:UsingBZR|suomi| [[::UbuntuWiki:UsingBZR/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/fr | • {{#if: UbuntuWiki:UsingBZR|français| [[::UbuntuWiki:UsingBZR/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/gu | • {{#if: UbuntuWiki:UsingBZR|ગુજરાતી| [[::UbuntuWiki:UsingBZR/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/he | • {{#if: UbuntuWiki:UsingBZR|עברית| [[::UbuntuWiki:UsingBZR/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/hu | • {{#if: UbuntuWiki:UsingBZR|magyar| [[::UbuntuWiki:UsingBZR/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/id | • {{#if: UbuntuWiki:UsingBZR|Bahasa Indonesia| [[::UbuntuWiki:UsingBZR/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/it | • {{#if: UbuntuWiki:UsingBZR|italiano| [[::UbuntuWiki:UsingBZR/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ja | • {{#if: UbuntuWiki:UsingBZR|日本語| [[::UbuntuWiki:UsingBZR/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ko | • {{#if: UbuntuWiki:UsingBZR|한국어| [[::UbuntuWiki:UsingBZR/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ksh | • {{#if: UbuntuWiki:UsingBZR|Ripoarisch| [[::UbuntuWiki:UsingBZR/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/mr | • {{#if: UbuntuWiki:UsingBZR|मराठी| [[::UbuntuWiki:UsingBZR/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ms | • {{#if: UbuntuWiki:UsingBZR|Bahasa Melayu| [[::UbuntuWiki:UsingBZR/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/nl | • {{#if: UbuntuWiki:UsingBZR|Nederlands| [[::UbuntuWiki:UsingBZR/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/no | • {{#if: UbuntuWiki:UsingBZR|norsk| [[::UbuntuWiki:UsingBZR/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/oc | • {{#if: UbuntuWiki:UsingBZR|occitan| [[::UbuntuWiki:UsingBZR/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/pl | • {{#if: UbuntuWiki:UsingBZR|polski| [[::UbuntuWiki:UsingBZR/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/pt | • {{#if: UbuntuWiki:UsingBZR|português| [[::UbuntuWiki:UsingBZR/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ro | • {{#if: UbuntuWiki:UsingBZR|română| [[::UbuntuWiki:UsingBZR/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/ru | • {{#if: UbuntuWiki:UsingBZR|русский| [[::UbuntuWiki:UsingBZR/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/si | • {{#if: UbuntuWiki:UsingBZR|සිංහල| [[::UbuntuWiki:UsingBZR/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/sq | • {{#if: UbuntuWiki:UsingBZR|shqip| [[::UbuntuWiki:UsingBZR/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/sr | • {{#if: UbuntuWiki:UsingBZR|српски / srpski| [[::UbuntuWiki:UsingBZR/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/sv | • {{#if: UbuntuWiki:UsingBZR|svenska| [[::UbuntuWiki:UsingBZR/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/th | • {{#if: UbuntuWiki:UsingBZR|ไทย| [[::UbuntuWiki:UsingBZR/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/tr | • {{#if: UbuntuWiki:UsingBZR|Türkçe| [[::UbuntuWiki:UsingBZR/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/vi | • {{#if: UbuntuWiki:UsingBZR|Tiếng Việt| [[::UbuntuWiki:UsingBZR/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/yue | • {{#if: UbuntuWiki:UsingBZR|粵語| [[::UbuntuWiki:UsingBZR/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/zh | • {{#if: UbuntuWiki:UsingBZR|中文| [[::UbuntuWiki:UsingBZR/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/zh-hans | • {{#if: UbuntuWiki:UsingBZR|中文(简体)| [[::UbuntuWiki:UsingBZR/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UsingBZR | UbuntuWiki:UsingBZR | {{#if: | :}}UbuntuWiki:UsingBZR}}/zh-hant | • {{#if: UbuntuWiki:UsingBZR|中文(繁體)| [[::UbuntuWiki:UsingBZR/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuWiki:UsingBZR|:UbuntuWiki:UsingBZR|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :UbuntuWiki:UsingBZR/zh | | {{#ifexist: UbuntuWiki:UsingBZR/zh | | {{#ifeq: {{#titleparts:UbuntuWiki:UsingBZR|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UbuntuWiki:UsingBZR|1|-1|}} | zh | | }}
Six steps to using bzr
To collaborate more effectively on source packages, it would be wise to push your packages to the bzr repository. Now, as long as in your package you specify a link to the .orig tarball, then all you need to push is your debian/ sub-directory, containing the package source. I will outline how to do this. You must have your SSH key published in Launchpad, but that is beyond the scope of this document.
1. cd to your package source directory
- For instance, I may run, `cd ~/src/ubuntustudio/somalist`.
2. Initialise the bzr repository.
- `bzr init`
3. Add the debian sub-directory to the repository.
- `bzr add debian`
4. I guess you would like to commit this change. This is the command to run when you want to commit any change.
- `bzr commit -m "commit comment"`
- Of course, I'm sure you want a different comment than 'commit comment'.
5. To see a diff between revisions, run
- `bzr diff`
- This is useful to run before every commit, to see exactly what changes are about to be committed.
6. Now push the repository out to Launchpad!
- `bzr push sftp://<lp-name>@bazaar.launchpad.net/~<lp-owner>/<product>/<branch-name>`
- `lp-name` is your Launchpad ID; i.e. mine would be `tsmithe`
- `branch-name` is the name of the branch that you wish to create. We have decided that this should happen per package. So, in my example case, the branch-name is 'somalist'.
- `product` is the Launchpad-registered product that you are working on.
- `lp-owner` is the person whose branch we are developing on. You can have a team branch (e.g. `ubuntustudio-dev`) that the whole team may work on, or your own branch (in which case the `lp-owner` is your `lp-name`) that you only can push to and that can be used to maintain your own copy of the sources, which you can later merge into the main branch (owned by the team), say; or that others can pull from.
- In future pushes, bzr will remember the location of the repository to push to for this local branch. So you can then just run `bzr push`.
That's it! You've pushed your code out! Now you can do version control, revert mistakes, collaborate, or merge changes from another branch. Simple!
Remember, `man bzr` is a good reference.
This page was taken and modified slightly to generalise from UbuntuStudio/bzr