mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-28 07:26:15 +01:00
- more or less only some minor cosmetic changes
This commit is contained in:
parent
580510c97a
commit
b0000b2834
@ -129,9 +129,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
conf.add_section(e.file, e.url, user, passwd)
|
conf.add_section(e.file, e.url, user, passwd)
|
||||||
if try_again: self.postoptparse(try_again = False)
|
if try_again: self.postoptparse(try_again = False)
|
||||||
|
|
||||||
self.conf = conf
|
|
||||||
self.options.verbose = conf.config['verbose']
|
self.options.verbose = conf.config['verbose']
|
||||||
conf.exclude_glob = conf.config['exclude_glob'].split()
|
|
||||||
|
|
||||||
|
|
||||||
def get_cmd_help(self, cmdname):
|
def get_cmd_help(self, cmdname):
|
||||||
@ -225,8 +223,11 @@ class Osc(cmdln.Cmdln):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
args = slash_split(args)
|
args = slash_split(args)
|
||||||
if (subcmd == 'll'): opts.verbose = True;
|
if subcmd == 'll':
|
||||||
if (subcmd == 'lL' or subcmd == 'LL'): opts.verbose = True; opts.expand = True;
|
opts.verbose = True
|
||||||
|
if subcmd == 'lL' or subcmd == 'LL':
|
||||||
|
opts.verbose = True
|
||||||
|
opts.expand = True
|
||||||
|
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
project = args[0]
|
project = args[0]
|
||||||
@ -1224,12 +1225,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
${cmd_option_list}
|
${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)
|
args = slash_split(args)
|
||||||
tproject = tpackage = None
|
tproject = tpackage = None
|
||||||
|
|
||||||
if (len(args) == 1):
|
if len(args) == 1:
|
||||||
print >>sys.stderr, "defaulting to %s/%s" % (conf.config['branch_project'],args[0])
|
print >>sys.stderr, 'defaulting to %s/%s' % (conf.config['branch_project'], args[0])
|
||||||
# python has no args.unshift ???
|
# python has no args.unshift ???
|
||||||
args = [ conf.config['branch_project'], args[0] ]
|
args = [ conf.config['branch_project'], args[0] ]
|
||||||
|
|
||||||
|
@ -440,6 +440,7 @@ def get_config(override_conffile = None,
|
|||||||
raise oscerr.ConfigError('cannot parse \'%s\' setting: ' % i + str(e), conffile)
|
raise oscerr.ConfigError('cannot parse \'%s\' setting: ' % i + str(e), conffile)
|
||||||
|
|
||||||
config['packagecachedir'] = os.path.expanduser(config['packagecachedir'])
|
config['packagecachedir'] = os.path.expanduser(config['packagecachedir'])
|
||||||
|
config['exclude_glob'] = config['exclude_glob'].split()
|
||||||
|
|
||||||
re_clist = re.compile('[, ]+')
|
re_clist = re.compile('[, ]+')
|
||||||
config['extra-pkgs'] = [ i.strip() for i in re_clist.split(config['extra-pkgs'].strip()) if i ]
|
config['extra-pkgs'] = [ i.strip() for i in re_clist.split(config['extra-pkgs'].strip()) if i ]
|
||||||
|
@ -284,7 +284,7 @@ class Project:
|
|||||||
self.pac_root = self.read_packages().getroot()
|
self.pac_root = self.read_packages().getroot()
|
||||||
self.pacs_have = [ pac.get('name') for pac in self.pac_root.findall('package') ]
|
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)
|
self.pacs_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) ]
|
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 ]
|
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)
|
# 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):
|
def addPackage(self, pac):
|
||||||
import fnmatch
|
import fnmatch
|
||||||
for i in conf.exclude_glob:
|
for i in conf.config['exclude_glob']:
|
||||||
if fnmatch.fnmatch(pac, i):
|
if fnmatch.fnmatch(pac, i):
|
||||||
return False
|
return False
|
||||||
state = self.get_state(pac)
|
state = self.get_state(pac)
|
||||||
@ -955,7 +955,7 @@ class Package:
|
|||||||
|
|
||||||
# gather unversioned files, but ignore some stuff
|
# gather unversioned files, but ignore some stuff
|
||||||
self.excluded = [ i for i in os.listdir(self.dir)
|
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) ]
|
if fnmatch.fnmatch(i, j) ]
|
||||||
self.filenamelist_unvers = [ i for i in os.listdir(self.dir)
|
self.filenamelist_unvers = [ i for i in os.listdir(self.dir)
|
||||||
if i not in self.excluded
|
if i not in self.excluded
|
||||||
|
Loading…
Reference in New Issue
Block a user