~vila/ubuntu-ci-services-itself/integration

« back to all changes in this revision

Viewing changes to juju-deployer/update.py

Merge trunk resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
plugin.load_plugins()
44
44
 
45
45
 
46
 
 
47
46
class UpdateArgParser(argparse.ArgumentParser):
48
47
    """A parser for the uci-run-tests script."""
49
48
 
140
139
 
141
140
def set_branches_and_revnos(paths, branches):
142
141
    """Update the yaml files with the new revnos.
143
 
    
 
142
 
144
143
    We cannot use pyyaml for this, as it doesn't preserve order or preserve
145
144
    comments.
146
145
    """
163
162
            with open(cfg, 'w') as fp:
164
163
                fp.write(new_body)
165
164
 
 
165
 
166
166
def main(args=None):
167
167
    if args is None:
168
168
        args = sys.argv[1:]
174
174
    paths = list(get_deployer_configs(deployer_dir))
175
175
 
176
176
    if ns.assert_pinned:
177
 
        all_pinned =  ensure_all_branches_are_pinned(paths)
 
177
        all_pinned = ensure_all_branches_are_pinned(paths)
178
178
        return not bool(all_pinned)
179
179
    else:
180
180
        branches = get_branches_and_revnos(paths, ns.check)