Ubuntu logo

Packaging Guide

8. Obtendo o mais recente

Se alguém mais enviou alterações para um pacote, você deverá puxar essas alterações para suas próprias cópias dos ramos do pacote.

8.1. Atualizando seu ramo principal

Atualizar sua cópia de um ramo que corresponde ao pacote de uma versão específica é bastante simples, é só usar “bzr pull” do diretório apropriado:

$ cd tomboy/tomboy.dev
$ bzr pull

This works wherever you have a checkout of a branch, so it will work for things like branches of saucy, trusty-proposed, etc.

8.2. Obtendo os mais recentes para dentro do seu ramo de trabalho

Once you have updated your copy of a distroseries branch, then you may want to merge this in to your working branches as well, so that they are based on the latest code.

You don’t have to do this all the time though. You can work on slightly older code with no problems. The disadvantage would come if you were working on some code that someone else changed. If you are not working on the latest version then your changes may not be correct, and may even produce conflicts.

The merge does have to be done at some point though. The longer it is left, the harder may be, so doing it regularly should keep each merge simple. Even if there are many merges the total effort would hopefully be less.

To merge the changes you just need to use bzr merge, but you must have committed your current work first:

$ cd tomboy/bug-12345
$ bzr merge ../tomboy.dev

Any conflicts will be reported, and you can fix them up. To review the changes that you just merged use bzr diff. To undo the merge use bzr revert. Once you are happy with the changes then use bzr commit.

8.3. Fazendo referência à versões de um pacote

You will often think in terms of versions of a package, rather than the underlying Bazaar revision numbers. bzr-builddeb provides a revision specifier that makes this convenient. Any command that takes a -r argument to specify a revision or revision range will work with this specifier, e.g. bzr log, bzr diff, and so on. To view the versions of a package, use the package: specifier:

$ bzr diff -r package:0.1-1..package:0.1-2

Isso mostra as diferenças entre as versões 0.1-1 e 0.1-2 do pacote.