mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 23:16:14 +01:00
- commit: check if "_pulled" file exists before removing it
- fixed indention
This commit is contained in:
parent
6ca8d75fa7
commit
b983f116eb
@ -4368,20 +4368,19 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
"""
|
||||
|
||||
if not is_package_dir('.'):
|
||||
raise oscerr.NoWorkingCopy("Error: \"%s\" is not an osc working copy." % os.path.abspath("."))
|
||||
raise oscerr.NoWorkingCopy('Error: \'%s\' is not an osc working copy.' % os.path.abspath('.'))
|
||||
p = Package('.')
|
||||
# check if everything is committed
|
||||
for filename in p.filenamelist:
|
||||
st = p.status(filename)
|
||||
if st != ' ':
|
||||
if p.status(filename) != ' ':
|
||||
raise oscerr.WrongArgs('Please commit your local changes first!')
|
||||
# check if we need to update
|
||||
upstream_rev = p.latest_rev()
|
||||
if p.rev != upstream_rev:
|
||||
raise oscerr.WorkingCopyOutdated((p.absdir, p.rev, upstream_rev))
|
||||
if not p.islink():
|
||||
elif not p.islink():
|
||||
raise oscerr.WrongArgs('osc pull only works on linked packages.')
|
||||
if not p.isexpanded():
|
||||
elif not p.isexpanded():
|
||||
raise oscerr.WrongArgs('osc pull only works on expanded links.')
|
||||
|
||||
# hack
|
||||
|
@ -878,6 +878,7 @@ class Package:
|
||||
print
|
||||
print 'Committed revision %s.' % self.rev
|
||||
|
||||
if self.ispulled():
|
||||
os.unlink(os.path.join(self.storedir, '_pulled'))
|
||||
if self.islinkrepair():
|
||||
os.unlink(os.path.join(self.storedir, '_linkrepair'))
|
||||
|
Loading…
Reference in New Issue
Block a user