Merge lp://staging/~marcoceppi/charm-tools/vcs into lp://staging/~charmers/charm-tools/trunk

Proposed by Marco Ceppi
Status: Merged
Approved by: Clint Byrum
Approved revision: 166
Merged at revision: 157
Proposed branch: lp://staging/~marcoceppi/charm-tools/vcs
Merge into: lp://staging/~charmers/charm-tools/trunk
Diff against target: 485 lines (+412/-7)
6 files modified
Makefile (+4/-1)
helpers/bash/vcs.bash (+243/-0)
helpers/sh/net.sh (+4/-5)
tests/helpers/helpers.bash (+18/-0)
tests/helpers/lib.sh (+3/-1)
tests/helpers/test_vcs.bash (+140/-0)
To merge this branch: bzr merge lp://staging/~marcoceppi/charm-tools/vcs
Reviewer Review Type Date Requested Status
Clint Byrum (community) Approve
charmers Pending
Review via email: mp+121129@code.staging.launchpad.net

Description of the change

I noticed so far two charms[1][3][2] take wild user input, supposedly a remote repository url, and takes action against that. This merge is designed to streamline the action of identifying what type of scm/vcs the remote source is and pull it down, or update a local repo from the remote source.

Demonstration of potential use cases: http://shelr.tv/records/50372c849660807bfb000098

[1]: http://jujucharms.com/charms/precise/wordpress
[2]: http://jujucharms.com/~mark-mims/oneiric/rails
[3]: http://jujucharms.com/charms/precise/node-app

To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I can has tests?! kthxbai!

review: Needs Fixing
163. By Marco Ceppi

Start of tests for vcs helper

164. By Marco Ceppi

* Now with 20% more bash
* Start of test_vcs

165. By Marco Ceppi

Deferring update_repo and fetch_repo to a later data as there is no sane way to accurately mock those setups.

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

omg u can haz. http://i.imgur.com/9xnK8.gif

* Moved vcs.sh to vcs.bash, as it's a bash script
* Created helpers.bash and update lib.sh
* Test(s) for vcs as best as can be covered

I have no idea what would need to be done to update the charm-helpers packaging to add charm-helpers-bash, so some guidance on that if it's needed would be cool

166. By Marco Ceppi

Bad logic for CH_VCS_INSTALL_DEPS

Revision history for this message
Mark Mims (mark-mims) wrote :

also have the summit charms... I'll link them here when I push the most current versions up to lp (they're still on oneiric).

Summit's just like rails in that it's django and pulls in the app itself from a config branch.
It _also_ pulls in theme branches too as separate config items.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks for adding the tests Marco, this is awesome.

Approved, with 2 minors to fix:

1) needs to be run from Makefile's "make check" rule so the packaging will be tested.

2) Just comment out the unimplemented tests with a # TODO: add tests. Printing "DEFERRED" there is really confusing.

review: Approve
167. By Marco Ceppi

Updated makefile to test for bash

168. By Marco Ceppi

Hide deferred tests for now, TODO

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches