Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm setting up a script to download, build and install a big project (that uses bazaar) and want to trigger the build process only if the "bzr update" does NOT return "Tree is up to date at revision n" ; How can I do that ? Are there specific return codes to look for ? Ideally I would be able to do that on other VC systems, namely git & svn.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can use the exit code of bzr missing URL to decide whether you need to do bzr up and rebuild. The exit code is 0 if there are no updates, 1 otherwise.

In bzr missing URL you only need to specify URL once, afterwards you can use the :parent shortcut, or you could set parent_location in .bzr/branch/branch.conf and use :parent always.

share|improve this answer

It would be easiest to just grep for Tree is up to date in the bzr up output I imagine. There is no return code you can use.

Alternatively, you can use bzr missing :parent before you run bzr up to see if there are any revisions that are missing locally.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.