1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 17:16:23 +01:00

- more or less only some minor cosmetic changes

This commit is contained in:
Marcus Hüwe 2009-08-21 19:39:12 +00:00
parent 580510c97a
commit b0000b2834
3 changed files with 14 additions and 12 deletions

View File

@ -129,9 +129,7 @@ class Osc(cmdln.Cmdln):
conf.add_section(e.file, e.url, user, passwd)
if try_again: self.postoptparse(try_again = False)
self.conf = conf
self.options.verbose = conf.config['verbose']
conf.exclude_glob = conf.config['exclude_glob'].split()
def get_cmd_help(self, cmdname):
@ -225,8 +223,11 @@ class Osc(cmdln.Cmdln):
"""
args = slash_split(args)
if (subcmd == 'll'): opts.verbose = True;
if (subcmd == 'lL' or subcmd == 'LL'): opts.verbose = True; opts.expand = True;
if subcmd == 'll':
opts.verbose = True
if subcmd == 'lL' or subcmd == 'LL':
opts.verbose = True
opts.expand = True
if len(args) == 1:
project = args[0]
@ -1224,14 +1225,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
${cmd_option_list}
"""
if (subcmd == 'branch_co' or subcmd == 'branchco' or subcmd == 'bco'): opts.checkout = True
if subcmd == 'branch_co' or subcmd == 'branchco' or subcmd == 'bco': opts.checkout = True
args = slash_split(args)
tproject = tpackage = None
if (len(args) == 1):
print >>sys.stderr, "defaulting to %s/%s" % (conf.config['branch_project'],args[0])
if len(args) == 1:
print >>sys.stderr, 'defaulting to %s/%s' % (conf.config['branch_project'], args[0])
# python has no args.unshift ???
args = [ conf.config['branch_project'] , args[0] ]
args = [ conf.config['branch_project'], args[0] ]
if not (len(args) >= 2 and len(args) <= 4):

View File

@ -440,6 +440,7 @@ def get_config(override_conffile = None,
raise oscerr.ConfigError('cannot parse \'%s\' setting: ' % i + str(e), conffile)
config['packagecachedir'] = os.path.expanduser(config['packagecachedir'])
config['exclude_glob'] = config['exclude_glob'].split()
re_clist = re.compile('[, ]+')
config['extra-pkgs'] = [ i.strip() for i in re_clist.split(config['extra-pkgs'].strip()) if i ]

View File

@ -283,8 +283,8 @@ class Project:
if conf.config['do_package_tracking']:
self.pac_root = self.read_packages().getroot()
self.pacs_have = [ pac.get('name') for pac in self.pac_root.findall('package') ]
self.pacs_excluded = [ i for i in os.listdir(self.dir)
for j in conf.exclude_glob
self.pacs_excluded = [ i for i in os.listdir(self.dir)
for j in conf.config['exclude_glob']
if fnmatch.fnmatch(i, j) ]
self.pacs_unvers = [ i for i in os.listdir(self.dir) if i not in self.pacs_have and i not in self.pacs_excluded ]
# store all broken packages (e.g. packages which where removed by a non-osc cmd)
@ -363,7 +363,7 @@ class Project:
def addPackage(self, pac):
import fnmatch
for i in conf.exclude_glob:
for i in conf.config['exclude_glob']:
if fnmatch.fnmatch(pac, i):
return False
state = self.get_state(pac)
@ -955,7 +955,7 @@ class Package:
# gather unversioned files, but ignore some stuff
self.excluded = [ i for i in os.listdir(self.dir)
for j in conf.exclude_glob
for j in conf.config['exclude_glob']
if fnmatch.fnmatch(i, j) ]
self.filenamelist_unvers = [ i for i in os.listdir(self.dir)
if i not in self.excluded