Latest Posts

Topic: SVN Server

belizeian

Topic Opener
Joined: 2010-01-22, 00:38
Posts: 8
Ranking
Pry about Widelands
Posted at: 2010-02-11, 13:52

true that.


Top Quote
belizeian

Topic Opener
Joined: 2010-01-22, 00:38
Posts: 8
Ranking
Pry about Widelands
Posted at: 2010-02-14, 13:36

What's the best way to keep it up to date?

bzr update

Is what Iv'e tried but I see commits that arent' getting updated.


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-02-14, 14:32

bzr pull is what you search.


Top Quote
belizeian

Topic Opener
Joined: 2010-01-22, 00:38
Posts: 8
Ranking
Pry about Widelands
Posted at: 2010-02-14, 15:35

Pull or merge?

and is there a way to determine current version of a widelands in bazaar without pulling or mergeing?

Ie fooling with a automatic updateing and build script. I can get the current verison I have by currev=$(sed -n 1p VERSION) I need the version in the repo so I can compare and determine if I need to update.


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-02-14, 16:43

You need merge if your branch and the remote branch have diverged, otherwise you can use pull. Please consider reading the BzrPrimer and the tutorials on the bzr website. You can use bzr revno to get the current revision, though note that each branch has its own numbering.


Top Quote
raistware

Joined: 2009-09-07, 16:31
Posts: 71
Ranking
Likes to be here
Posted at: 2010-02-15, 08:27

The way I will work is:

Only first time:

  • $ cd ~
  • $ bzr branch lp:widelands <- This download server main branch
  • $ cd widelands <- Enter on widelands dev dir

To add a new feature:

  • $ cd ~/widelands/
  • $ bzr branch widelands feature-xxx <- This creates my branch to hack
  • $ cd feature-xxx
  • make changes
  • $ bzr commit -m "Feature added: xxx"
  • $ bzr push lp:~raul.ferriz/widelands/my-feature-xxx
  • make more changes
  • $ bzr commit -m "Bug fixed on feature xxx"
  • $ bzr push lp:~raul.ferriz/widelands/my-feature-xxx

To get changes on main branch:

  • $ cd ~/widelands/
  • $ bzr pull

To fix a bug you can work on mainstream or create a new branch only for fixing it, to avoid breaking mainstream:

  • $ cd ~/widelands/
  • $ bzr branch widelands bug-xxx <- This creates my branch to hack
  • $ cd bug-xxx
  • hack to solve bug
  • $ bzr commit -m "Bug xxx fixed"
  • $ bzr push lp:~raul.ferriz/widelands/fix-bug-xxx

When bug get fully fixed, then you can propose a merge with main through launchpad web, or rebase your bug-xxx branch with mainstream, merge bug-xxx with main and do a push on main:

  • $ cd ~/widelands/bug-xxx
  • $ bzr rebase .. <- We are on bug-xxx branch and want to rebase with mainstream (on parent directory)
  • $ cd ..
  • $ bzr merge bug-xxx
  • Solve conflicts
  • $ bzr commit -m "Merged with bug-xxx" <- Allways after a merge a commit is needed
  • $ bzr push <- Push changes to mainstream

Doing that way another can push a change before you push yours, in this case a conflict could arise when try to push, 'branches has diversed' or something like. When this happens you simply uncommit your merges to main:

  • $ bzr uncommit

Revert to undo merge:

  • $ bzr revert

Update your mainstream (see above) and redo the rebase, merge, commit and push.

Doing manually can be a bit 'time consuming' if a lot of developers push at same time so I think that is better to make a petition to merge and solve all on launchpad web.

PD: Please, add the branch name to current version, because now we can have the same revision number for a lot of different branches.

Thanks

Edited: 2010-02-15, 08:30

Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-02-15, 18:45

raistware, that's a nice writeup. Mind pimping the BzrPrimer site a bit?


Top Quote
raistware

Joined: 2009-09-07, 16:31
Posts: 71
Ranking
Likes to be here
Posted at: 2010-02-16, 08:41

SirVer wrote: raistware, that's a nice writeup. Mind pimping the BzrPrimer site a bit?

I added this to BzrPrimer, but I think that old content and my added content can make a mess on brains developers that are new to distributed control versions face-smile.png

Edited: 2010-02-16, 08:42

Top Quote