Merge lp://qastaging/~lazypower/charm-helpers/git-fetch-update into lp://qastaging/charm-helpers

Proposed by Charles Butler
Status: Needs review
Proposed branch: lp://qastaging/~lazypower/charm-helpers/git-fetch-update
Merge into: lp://qastaging/charm-helpers
Diff against target: 31 lines (+10/-0)
1 file modified
charmhelpers/fetch/giturl.py (+10/-0)
To merge this branch: bzr merge lp://qastaging/~lazypower/charm-helpers/git-fetch-update
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+270135@code.qastaging.launchpad.net

Description of the change

This alters the behavior of the git fetcher by adding a small loop to attempt updating of a git repository if the path exists on disk prior to attempting a clone.

The existing behavior is to raise a UnhandledRepositoryUrl exception when the path exists, which is a bit confusing to consumers of install_remote with git VCS urls - which seems to be a one shot fetcher. Run once, and guard against subsequent runs.

If this would fundamentally change the behavior of install_remote, i do not +1 this merge, but wanted to start the conversation around this small patch to see if we can't update charm-helpers to be a little more VCS friendly for cheap operations like an update.

To post a comment you must log in.

Unmerged revisions

441. By Charles Butler

Adds a small logic loop to attempt an update of an existing directory if the
directory exists, and the git handler has assumed control from install_remote.

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