Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin for bzr. #143

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

atomatt
Copy link

@atomatt atomatt commented Dec 16, 2015

Supports sync and reup, hopefully as efficiently as is reasonably
possible.

Requires bzr binary in PATH.

Supports sync and reup, hopefully as efficiently as is reasonably
possible.

Requires `bzr` binary in PATH.
@oconnor663
Copy link
Member

Sweet! I'll take a look at this later today.

@oconnor663
Copy link
Member

By the way, was the architecture doc helpful at all? As far as I know no one's ever read it.

@atomatt
Copy link
Author

atomatt commented Dec 16, 2015

I did refer to that doc, but mostly copied the hg plugin and then tidied things up a bit.

@atomatt
Copy link
Author

atomatt commented Dec 17, 2015

It looks unrelated to this branch, but is there anything I need to do to fix the AppVeyor build failure?

@oconnor663
Copy link
Member

The AppVeyor failures are totally unrelated, but thanks for checking. You can follow the exciting action at #140.


def bzr(path, *args, capture_output=False):
cwd = os.getcwd()
os.chdir(path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use Popen's cwd argument instead of calling os.chdir here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer, thanks.

@oconnor663
Copy link
Member

Thanks again for the PR, this is great. If you'd prefer that I take it from here that's fine too, though I just installed bzr for the first time :)

"Every Revision has a Revision ID (also called a revid), which is a long
opaque string that serves as a Universally Unique ID; no other Revision
anywhere will ever have the same ID, and anywhere this Revision is, it
will have that ID."
- http://wiki.bazaar.canonical.com/MatthewFuller/SpotDocs/RevNumbering
@atomatt
Copy link
Author

atomatt commented Dec 19, 2015

I think I covered all your comments now? Is there anything else I can help with?

@oconnor663
Copy link
Member

I just pushed a branch on top of yours with a few tests: https://github.com/buildinspace/peru/commits/bzr_tests. These are pretty much copies of the hg tests. One of them is failing -- the reason why is that it looks like the bzr plugin never bzr pull when rev isn't defined. That means that for example peru sync --no-cache will fail to actually re-fetch a bzr repo. We should probably have pull_if_needed explicitly check whether a rev was provided, and if not always pull.

Once that's done, I think we're good to go.

Another difference that came up when I was writing the reup test was that I noticed the bzr plugin doesn't support the (somewhat confusingly named) reup field that the git and hg plugins support. This lets you specify what branch the plugin should look to determine the latest rev, when running peru reup. If you want, we could add that in, or we can just get back to it later if anyone needs it.

@oconnor663
Copy link
Member

(Note to self: document the new plugin.)

@atomatt
Copy link
Author

atomatt commented Jan 4, 2016

Hi! I took a xmas break but I'm still interested in landing this. I'll look at the tests and the reup branch name soon ... unless you get there first.

@oconnor663
Copy link
Member

Same here :) All yours.

@oconnor663
Copy link
Member

I still think this is great and plan to get back to it. Looks like we've both been busy with other things.

@atomatt
Copy link
Author

atomatt commented Apr 5, 2016

Yes, it's still on my todo list too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants