Edgewall Software

Ticket #6627 (closed defect: fixed)

Opened 12 months ago

Last modified 11 months ago

hotcopy fails in 0.11b1 on Windows with pysqlite-2.4.0

Reported by: goran.wallgren@… Owned by: cboos
Priority: high Milestone: 0.11
Component: admin/console Version: 0.11b1
Severity: major Keywords:
Cc: goran.wallgren@…, scottb@…

Description

This bug is closely related to #1123 - it has reappeared because of a new journal file in that (newer) version of SQLite.

It can hopefully be solved in the same way: if the journal file is not needed for a hotcopy, it can be added to the "skip" list inside "Python/Lib/site-packages/trac/admin/console.py".

Here are the errors I received:

Hotcopying E:\Dev\trac\susrepo1.db to e:/Dev/Backups/susrepo1.db.trac_hotcopy ..
.
Traceback (most recent call last):
  File "E:\dev\python24\scripts\trac-admin-script.py", line 7, in ?
    sys.exit(
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 1194, in
run
    return admin.onecmd(command)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 102, in o
necmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "E:\Dev\Python24\Lib\cmd.py", line 219, in onecmd
    return func(arg)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 1140, in
do_hotcopy
    copytree(self.__env.path, dest, symlinks=1, skip=skip)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 64, in co
pytree
    copytree(srcname, dstname, symlinks, skip)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 71, in co
pytree
    raise shutil.Error, errors
shutil.Error: [('E:\\Dev\\trac\\susrepo1.db\\db\\trac.db-stmtjrnl', u'e:/Dev/Bac
kups/susrepo1.db.trac_hotcopy\\db\\trac.db-stmtjrnl', <exceptions.IOError instan
ce at 0x01005D50>)]

Attachments

Change History

Changed 12 months ago by anonymous

  • cc goran.wallgren@… added; goran.wallgren@… removed

Sorry, my email address is goran.wallgren@…

Changed 12 months ago by goran.wallgren@…

To clarify, the name of the new journal file is "trac.db-stmtjrnl"

A quick fix is to replace the line

skip = ['%s-journal'  % os.path.join(self.__env.path, db_path)]

with

skip = ['%s-journal'  % os.path.join(self.__env.path, db_path),
        '%s-stmtjrnl' % os.path.join(self.__env.path, db_path)]

Changed 11 months ago by scottb@…

  • cc scottb@… added

Changed 11 months ago by cboos

  • owner changed from cmlenz to cboos
  • priority changed from normal to high

Reproduced with pysqlite-2.4.1 as well.

Changed 11 months ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Fixed in r6484 for trunk and r6485 for 0.10.5.

Add/Change #6627 (hotcopy fails in 0.11b1 on Windows with pysqlite-2.4.0)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.