neoneye
neoneye

Reputation: 52221

bzr checkout vs. bzr get

I wonder what the difference is between

bzr checkout ./MyProject MyProject.dev
# later followed by a
cd MyProject.dev
bzr pull ../MyProject

and

bzr get ./MyProject MyProject.dev
# later followed by
cd MyProject.dev
bzr pull

As far I can tell the only difference is:

  1. bzr get sets the pull location.
  2. bzr checkout doesn't set the pull location, so it must be specified the first time you pull.

Are there other differences?

Upvotes: 3

Views: 1869

Answers (4)

wadesworld
wadesworld

Reputation: 13763

This is one of the way cool features of Bazaar that doesn't get enough press: the ability for people to work the way that makes them comfortable, even on the same shared repository.

Have some git or other DVCS devotees? Fine. Have them use bzr branch.

Have some old-school svn guys who just can't wrap their heads around all the branching and merging? "Wait...I have to create a branch, do commits, then merge my branch, then push my branch? How stupid, I just want to commit!" Fine. Have them work with bzr checkout.

This type of flexibility is what draws me to Bazaar, despite the fact that git is wildly more popular and faster.

Upvotes: 3

James
James

Reputation: 6509

Basically you have the option of not being tied to the branch you got the code from: if you want a standalone copy use bzr get, if you want to be automatically bound to the original branch: use bzr checkout.

If you change your mind later and want it to behave more like SVN, you can do a bzr bind and any commits you make will automatically be committed to the parent branch.

Upvotes: 2

Adam Glauser
Adam Glauser

Reputation: 877

bzr get creates a branch, whereas bzr checkout creates a checkout. With a checkout, any revisions you commit to MyProject.dev will also be committed to MyProject.

For more detail, see the checkout tutorial.

Upvotes: 6

bialix
bialix

Reputation: 21473

In the case of bzr checkout you should not use bzr pull, but should use bzr update instead.

bzr get is alias of bzr branch which is roughly equivalent of git clone.

Upvotes: 7

Related Questions