Mercurial > treepkg > treepkg
diff treepkg/readconfig.py @ 511:e5b66539f893
new variable to set choose the scm for sources and debian dirs
svn_url and git_url are now deprecated in favour of url and scm_type
added a tag detector for git in kde enterprise packager
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Tue, 09 Nov 2010 17:20:47 +0000 |
parents | 5fda6768bef6 |
children | 3e08d6546d52 |
line wrap: on
line diff
--- a/treepkg/readconfig.py Tue Nov 09 15:26:20 2010 +0000 +++ b/treepkg/readconfig.py Tue Nov 09 17:20:47 2010 +0000 @@ -27,7 +27,7 @@ def convert_subversion_subset(raw): """Converts the string representation an svn subset into internal form The format in the config file is typically: - svn_url: svn://example.com/repository/trunk + url: svn://example.com/repository/trunk svn_subset: -N . subdir1 subdir2 @@ -66,10 +66,11 @@ packager_desc = [ "name", "base_dir", - ("svn_url", str,""), + ("url", str, ""), + ("svn_url", str, ""), ("svn_subset", convert_subversion_subset, ""), ("svn_externals", shlex.split, ""), - ("rules_svn_url", str, ""), ("packager_class", str, "treepkg.packager"), + ("rules_url", str, ""), ("packager_class", str, "treepkg.packager"), ("root_cmd", shlex.split, "sudo"), "builderconfig", "deb_email", "deb_fullname", ("deb_build_options", str, ""), ("version_template", str, "%(revision)s"), @@ -77,8 +78,7 @@ ("handle_dependencies", convert_bool), ("signing_key_id", str, ""), ("changelog_msg_template", str, "Update to revision %(revision)s"), - ("git_branch", str,""), - ("git_url", str,""), + ("branch", str,""), ("os", str, ""), ("builder_cls", str, "PBuilder"), ("status_hook", str, "") @@ -148,16 +148,11 @@ desc = packager_desc + module.PackageTrack.extra_config_desc packager_options = read_config_section(parser, section, desc, defaults=vars) - if not packager_options.get("svn_url") \ - and not packager_options.get('git_url'): + if not packager_options.get("url") and \ + not packager_options.get("svn_url"): print >>sys.stderr, "Missing repository URL in section %r" \ % (section) sys.exit(1) - elif packager_options.get("svn_url") \ - and packager_options.get('git_url'): - print >>sys.stderr, \ - "Warning: git_url in section %r will be ignored" \ - % (section) packagers.append(packager_options) # main config