Ticket #982 (closed enhancement: wontfix)
tg-admin shell exit confirmation question is annoying
Reported by: | bjourne | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.0 |
Component: | Toolbox | Version: | 0.9a5 |
Severity: | normal | Keywords: | |
Cc: |
Description
- start tg-admin shell
- press Ctrl+D
tg-admin asks you if you wish to commit your database changes. You are prompted with that question even if you haven't made any changes. And if i wished to commit my database changes I would have typed hub.commit(). I press Ctrl+D to quit so I don't want tg-admin to bother me. :)
Change History
comment:1 Changed 12 years ago by jorge.vargas
- Priority changed from normal to low
- Type changed from defect to enhancement
- Component changed from TurboGears to Toolbox
- Milestone set to 1.0b1
comment:2 Changed 12 years ago by bjourne
Then there are three options:
- Always save database changes when CTRL+D is pressed.
- Never save (and don't query about it) database changes when CTRL+D is pressed.
- Query only when you have outstanding changes.
3 would ofcourse be best. And, IMHO, either 1 or 2 would be better than the current behaviour. Also, if you use certain databases it isn't needed to "hub.commit()" data - changes are saved automatically. Or if you use IPython and type "exit" to exit, you aren't queried at all because EOFError isn't raised. AND all documentation tells you to (or should tell you) always type hub.commit() to save your changes.
I don't like a config setting because that would be like an extra annoyance instead of fixing the broken behaviour.
comment:3 Changed 12 years ago by jorge.vargas
- Milestone changed from 1.0b1 to 1.0b2
1- will be a huge problem what if you deleted one table by mistake? 2- is what was before and we had lots of complains about people saying the changes I do in shell don't reflect to the db. 3- that will be a lot of work just to avoid a question.
I guess we'll have to have a vote on this or something.
although we should look into the IPython issue.
comment:5 Changed 12 years ago by mbevan
The first few times I used the shell after upgrading (and did nothing with the database) I was quite alarmed to see the message. It, IMHO, should not appear unless there are active transactions.
comment:6 Changed 12 years ago by godoy
I vote for "3" ('ask only when the database was changed' / 'ask only when there are active transactions').
comment:8 Changed 11 years ago by alberto
- Milestone changed from 1.1 to __unclassified__
Batch moved into unclassified from 1.1 to properly track progress on the later
comment:10 Changed 9 years ago by jorge.vargas
- Status changed from new to closed
- Resolution set to wontfix
no one cares enough for this to happen
hi
that was put in so newbies won't go to the mailing list with "I'm doing changes and it doesn't save", which is a valid concern noone is used to have objects that need to commit changes.
I don't like it either but I think it's something that could be improve.
Maybe have a config varible? or a commandline switch?
the code of shell is very simple providing a patch that will give both functionalities or let you turn it on/off shouldn't be a problem :)