1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-24 11:12:14 +01:00

osc commit asks if some file has a '?' status

This commit is contained in:
Michal Vyskocil 2009-07-31 11:32:34 +00:00
parent 0d2e353188
commit 2d1126b847
2 changed files with 13 additions and 0 deletions

1
NEWS
View File

@ -5,6 +5,7 @@
- fix and improve request list and show output - fix and improve request list and show output
- new osc rremove command for remote source files removal - new osc rremove command for remote source files removal
- handle _service\* files correctly - handle _service\* files correctly
- osc commit asks if some file has a '?' status
0.120: 0.120:
- support "setlinkrev" for whole projects - support "setlinkrev" for whole projects

View File

@ -1641,6 +1641,18 @@ Please submit there instead, or use --nodevelproject to force direct submission.
pacs = findpacs(args) pacs = findpacs(args)
# warn if any of files has a ? status (usually a patch, or new source was not added to meta)
for p in pacs:
# no files given as argument? Take all files in current dir
if not p.todo:
p.todo = p.filenamelist + p.filenamelist_unvers
p.todo.sort()
for f in (f for f in p.todo if os.path.isfile(f)):
if p.status(f) == '?':
resp = raw_input("File `%s' is not in package meta. Would you like to continue? [y/N] "% (f, ))
if resp not in ('y', 'Y'):
return
if not msg: if not msg:
# open editor for commit message # open editor for commit message
# but first, produce status and diff to append to the template # but first, produce status and diff to append to the template