274 |
if not force: return False |
if not force: return False |
275 |
|
|
276 |
# XXX - os.path.join is hackish |
# XXX - os.path.join is hackish |
277 |
if subprocess.check_output(["svn", "diff", os.path.join(self.path, '..')]) != '': |
svn_diff_output = subprocess.check_output(["svn", "diff", os.path.join(self.path, '..')]) |
278 |
|
if svn_diff_output != '': |
279 |
|
print svn_diff_output |
280 |
print >>sys.stderr, "ERROR: Package has uncommitted changes!" |
print >>sys.stderr, "ERROR: Package has uncommitted changes!" |
281 |
return False |
if not force: |
282 |
|
return False |
283 |
|
|
284 |
|
# Forcing package submission: revert changes |
285 |
|
try: |
286 |
|
print >>sys.stderr, "WARNING: Force used; reverting svn changes" |
287 |
|
subprocess.check_call(["svn", "revert", "-R", os.path.join(self.path, '..')]) |
288 |
|
except subprocess.CalledProcessError: |
289 |
|
return False |
290 |
|
|
291 |
with open(self.path, "rw") as f: |
with open(self.path, "rw") as f: |
292 |
data = f.read() |
data = f.read() |
337 |
# Check patches still apply |
# Check patches still apply |
338 |
subprocess.check_call(['bm', '-p', '--nodeps'], cwd=self.cwd) |
subprocess.check_call(['bm', '-p', '--nodeps'], cwd=self.cwd) |
339 |
except subprocess.CalledProcessError: |
except subprocess.CalledProcessError: |
340 |
|
# XXX tail -n 15 SPECS/log.$PACKAGE |
341 |
return False |
return False |
342 |
|
|
343 |
return True |
return True |