Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #337 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

Make the shell automatically commit on exit

Reported by: michele Owned by: anonymous
Priority: normal Milestone: 1.0b1
Component: TurboGears Version:
Severity: normal Keywords:
Cc:

Description

Link to a  suggestion from Bob Ippolito.

Change History

comment:1 Changed 11 years ago by godoy

Michele, I don't think this is a good idea. It will make it needed to rollback() before exiting the shell when you just want to "play" with something.

The solution here is to document that even in "tg-admin shell" everything is wrapped inside a transaction. (We can market this as "to make it more real to test things before writing your code" ;-)).

I'm from the side of "safer is better" and not changing data on the database unless explicitly stated is definitely something I'd like to have.

On the other hand, there's no auto-commit when a function ends... :-( (I'm in favor of closing this as "wontfix")

comment:2 Changed 11 years ago by jorge.vargas

  • Milestone set to 1.0b1

I have been thinking of a "tg-admin batch" for a while that will work as "python input.py" maybe this can be one of it's features.

if you agree I'll change this ti a enhancement.

comment:3 Changed 11 years ago by kevin

I don't want to change the meaning of this ticket. tg-admin shell should commit on exit... people have asked for a command line option to run a script and then leave you in the shell (python itself has this). But, that's still a separate option.

comment:4 Changed 11 years ago by elvelind

  • Status changed from new to closed
  • Resolution set to fixed

as of r1563 the shell now asks if you want to commit at exit.

Note: See TracTickets for help on using tickets.