Modify

Opened 11 years ago

Closed 11 years ago

#11534 closed defect (cantfix)

Command not found?

Reported by: endquote Owned by: Jun Omae
Priority: normal Component: TracMigratePlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I have installed the plugin and it seems to be registered, but when I actually try to run the migrate, I get an ambiguous error.

C:\Users\trac>easy_install http://trac-hacks.org/svn/tracmigrateplugin/0.12
Downloading http://trac-hacks.org/svn/tracmigrateplugin/0.12
Doing subversion checkout from http://trac-hacks.org/svn/tracmigrateplugin/0.12
to c:\users\trac\appdata\local\temp\easy_install-a5kkvn\0.12
Processing 0.12
Running setup.py -q bdist_egg --dist-dir c:\users\trac\appdata\local\temp\easy_install-a5kkvn\0.12\egg-dist-tmp-rpb_u6
zip_safe flag not set; analyzing archive contents...
Adding tracmigrateplugin 0.12.0.2 to easy-install.pth file

Installed c:\python27\lib\site-packages\tracmigrateplugin-0.12.0.2-py2.7.egg
Processing dependencies for tracmigrateplugin==0.12.0.2
Finished processing dependencies for tracmigrateplugin==0.12.0.2

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot migrate c:\trac\stimulant postgres://trac:pass@localhost/trac?schema=trac
TracError: The Trac Environment needs to be upgraded.

Run "trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot upgrade"

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot upgrade
Upgrade done.

You may want to upgrade the Trac documentation now by running:

  trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot wiki upgrade

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot migrate c:\trac\stimulant postgres://trac:oMg8VY@localhost/trac?schema=trac
Error: Command not found

No documentation found for 'migrate'. Use 'help' to see the list of commands.

Did you mean one of these?
    upgrade
    milestone

I'm sure I just have something configured incorrectly, but I'm unsure how to debug it.

Attachments (0)

Change History (8)

comment:1 Changed 11 years ago by Jun Omae

Have you enabled the plugin in components section?

[components]
tracmigrate.* = enabled

If you've enabled, please turn on TracLogging with DEBUG level and post your $ENV/log/trac.log after reproduce it.

comment:2 Changed 11 years ago by endquote

I do have tracmigrate.* = enabled in the components section. I turned on logging, and the log is written to when I load a trac page (and it shows the migrate plugin loading), but I don't see anything new added to the log when I try to run the migrate command.

2014-01-31 17:18:08,404 Trac[env] INFO: -------------------------------- environment startup [Trac 1.0.1] --------------------------------
2014-01-31 17:18:08,418 Trac[loader] DEBUG: Adding plugin SimpleMultiProject 0.0.4dev from c:\trac\stimulant\plugins\simplemultiproject-0.0.4dev-py2.7.egg
2014-01-31 17:18:08,424 Trac[loader] DEBUG: Loading acct_mgr.admin from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,434 Trac[loader] DEBUG: Loading acct_mgr.api from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,434 Trac[loader] DEBUG: Loading acct_mgr.db from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,434 Trac[loader] DEBUG: Loading acct_mgr.htfile from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,434 Trac[loader] DEBUG: Loading acct_mgr.http from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,436 Trac[loader] DEBUG: Loading acct_mgr.macros from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,436 Trac[loader] DEBUG: Loading acct_mgr.notification from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,436 Trac[loader] DEBUG: Loading acct_mgr.pwhash from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,436 Trac[loader] DEBUG: Loading acct_mgr.svnserve from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,437 Trac[loader] DEBUG: Loading acct_mgr.web_ui from c:\python27\lib\site-packages\tracaccountmanager-0.4.3-py2.7.egg
2014-01-31 17:18:08,437 Trac[loader] DEBUG: Loading simplemultiproject from c:\trac\stimulant\plugins\simplemultiproject-0.0.4dev-py2.7.egg
2014-01-31 17:18:08,461 Trac[loader] DEBUG: Loading trac.about from c:\python27\lib\site-packages
2014-01-31 17:18:08,461 Trac[loader] DEBUG: Loading trac.admin.console from c:\python27\lib\site-packages
2014-01-31 17:18:08,464 Trac[loader] DEBUG: Loading trac.admin.web_ui from c:\python27\lib\site-packages
2014-01-31 17:18:08,467 Trac[loader] DEBUG: Loading trac.attachment from c:\python27\lib\site-packages
2014-01-31 17:18:08,467 Trac[loader] DEBUG: Loading trac.db.mysql from c:\python27\lib\site-packages
2014-01-31 17:18:08,469 Trac[loader] DEBUG: Loading trac.db.postgres from c:\python27\lib\site-packages
2014-01-31 17:18:08,484 Trac[loader] DEBUG: Loading trac.db.sqlite from c:\python27\lib\site-packages
2014-01-31 17:18:08,490 Trac[loader] DEBUG: Loading trac.mimeview.patch from c:\python27\lib\site-packages
2014-01-31 17:18:08,490 Trac[loader] DEBUG: Loading trac.mimeview.pygments from c:\python27\lib\site-packages
2014-01-31 17:18:08,496 Trac[loader] DEBUG: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("DistributionNotFound: Pygments>=0.6" not found)
2014-01-31 17:18:08,496 Trac[loader] DEBUG: Loading trac.mimeview.rst from c:\python27\lib\site-packages
2014-01-31 17:18:08,500 Trac[loader] DEBUG: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("DistributionNotFound: docutils>=0.3" not found)
2014-01-31 17:18:08,500 Trac[loader] DEBUG: Loading trac.mimeview.txtl from c:\python27\lib\site-packages
2014-01-31 17:18:08,506 Trac[loader] DEBUG: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("DistributionNotFound: textile>=2.0" not found)
2014-01-31 17:18:08,506 Trac[loader] DEBUG: Loading trac.prefs from c:\python27\lib\site-packages
2014-01-31 17:18:08,507 Trac[loader] DEBUG: Loading trac.search from c:\python27\lib\site-packages
2014-01-31 17:18:08,509 Trac[loader] DEBUG: Loading trac.ticket.admin from c:\python27\lib\site-packages
2014-01-31 17:18:08,509 Trac[loader] DEBUG: Loading trac.ticket.batch from c:\python27\lib\site-packages
2014-01-31 17:18:08,510 Trac[loader] DEBUG: Loading trac.ticket.query from c:\python27\lib\site-packages
2014-01-31 17:18:08,512 Trac[loader] DEBUG: Loading trac.ticket.report from c:\python27\lib\site-packages
2014-01-31 17:18:08,513 Trac[loader] DEBUG: Loading trac.ticket.roadmap from c:\python27\lib\site-packages
2014-01-31 17:18:08,513 Trac[loader] DEBUG: Loading trac.ticket.web_ui from c:\python27\lib\site-packages
2014-01-31 17:18:08,517 Trac[loader] DEBUG: Loading trac.timeline from c:\python27\lib\site-packages
2014-01-31 17:18:08,519 Trac[loader] DEBUG: Loading trac.versioncontrol.admin from c:\python27\lib\site-packages
2014-01-31 17:18:08,519 Trac[loader] DEBUG: Loading trac.versioncontrol.svn_authz from c:\python27\lib\site-packages
2014-01-31 17:18:08,519 Trac[loader] DEBUG: Loading trac.versioncontrol.web_ui from c:\python27\lib\site-packages
2014-01-31 17:18:08,526 Trac[loader] DEBUG: Loading trac.web.auth from c:\python27\lib\site-packages
2014-01-31 17:18:08,526 Trac[loader] DEBUG: Loading trac.web.session from c:\python27\lib\site-packages
2014-01-31 17:18:08,526 Trac[loader] DEBUG: Loading trac.wiki.admin from c:\python27\lib\site-packages
2014-01-31 17:18:08,526 Trac[loader] DEBUG: Loading trac.wiki.interwiki from c:\python27\lib\site-packages
2014-01-31 17:18:08,529 Trac[loader] DEBUG: Loading trac.wiki.macros from c:\python27\lib\site-packages
2014-01-31 17:18:08,529 Trac[loader] DEBUG: Loading trac.wiki.web_api from c:\python27\lib\site-packages
2014-01-31 17:18:08,529 Trac[loader] DEBUG: Loading trac.wiki.web_ui from c:\python27\lib\site-packages
2014-01-31 17:18:08,530 Trac[loader] DEBUG: Loading tracmigrate.admin from c:\python27\lib\site-packages\tracmigrateplugin-0.12.0.2-py2.7.egg
2014-01-31 17:18:08,530 Trac[loader] DEBUG: Loading tracopt.mimeview.enscript from c:\python27\lib\site-packages
2014-01-31 17:18:08,532 Trac[loader] DEBUG: Loading tracopt.mimeview.php from c:\python27\lib\site-packages
2014-01-31 17:18:08,533 Trac[loader] DEBUG: Loading tracopt.mimeview.silvercity from c:\python27\lib\site-packages
2014-01-31 17:18:08,539 Trac[loader] DEBUG: Skipping "tracopt.mimeview.silvercity = tracopt.mimeview.silvercity [silvercity]": ("DistributionNotFound: SilverCity>=0.9.4" not found)
2014-01-31 17:18:08,539 Trac[loader] DEBUG: Loading tracopt.perm.authz_policy from c:\python27\lib\site-packages
2014-01-31 17:18:08,540 Trac[loader] DEBUG: Loading tracopt.perm.config_perm_provider from c:\python27\lib\site-packages
2014-01-31 17:18:08,542 Trac[loader] DEBUG: Loading tracopt.ticket.clone from c:\python27\lib\site-packages
2014-01-31 17:18:08,542 Trac[loader] DEBUG: Loading tracopt.ticket.commit_updater from c:\python27\lib\site-packages
2014-01-31 17:18:08,545 Trac[loader] DEBUG: Loading tracopt.ticket.deleter from c:\python27\lib\site-packages
2014-01-31 17:18:08,545 Trac[loader] DEBUG: Loading tracopt.versioncontrol.git.git_fs from c:\python27\lib\site-packages
2014-01-31 17:18:08,551 Trac[loader] DEBUG: Loading tracopt.versioncontrol.svn.svn_fs from c:\python27\lib\site-packages
2014-01-31 17:18:08,552 Trac[loader] DEBUG: Loading tracopt.versioncontrol.svn.svn_prop from c:\python27\lib\site-packages
2014-01-31 17:18:08,555 Trac[default_workflow] DEBUG: Workflow actions at initialization: {u'resolve': {u'operations': [u'set_resolution'], 'name': u'resolve', 'default': 0, 'newstate': u'closed', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'accept': {u'operations': [u'set_owner_to_self'], 'name': u'accept', 'default': 0, 'newstate': u'accepted', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'leave': {u'operations': [u'leave_status'], 'name': u'leave', u'default': 1, 'newstate': u'*', 'oldstates': [u'*'], 'permissions': []}, u'reopen': {u'operations': [u'del_resolution'], 'name': u'reopen', 'default': 0, 'newstate': u'reopened', 'oldstates': [u'closed'], u'permissions': [u'TICKET_CREATE']}, u'reassign': {u'operations': [u'set_owner'], 'name': u'reassign', 'default': 0, 'newstate': u'assigned', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, '_reset': {'operations': ['reset_workflow'], 'name': 'reset', 'default': 0, 'newstate': 'new', 'oldstates': [], 'permissions': []}}

2014-01-31 17:18:08,588 Trac[environmentSetup] DEBUG: SimpleMultiProject database schema version: 5 (should be 5)
2014-01-31 17:18:08,589 Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect
2014-01-31 17:18:08,589 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/'">
2014-01-31 17:18:08,591 Trac[web_ui] WARNING: AccountModule is disabled because the password store does not support writing.
2014-01-31 17:18:08,596 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2014-01-31 17:18:08,599 Trac[session] DEBUG: Retrieving session for ID 'b977cf0574d3692cdb435e45'
2014-01-31 17:18:08,601 Trac[api] DEBUG: action controllers for ticket workflow: ['ConfigurableTicketWorkflow']
2014-01-31 17:18:08,605 Trac[chrome] DEBUG: Prepare chrome data for request
2014-01-31 17:18:08,917 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/chrome/site/your_project_logo.png'">
2014-01-31 17:18:08,924 Trac[chrome] WARNING: File your_project_logo.png not found in any of ['c:\\trac\\stimulant\\htdocs']
2014-01-31 17:18:08,924 Trac[main] WARNING: [10.0.28.199] HTTPNotFound: 404 Not Found (File your_project_logo.png not found)
2014-01-31 17:18:08,924 Trac[session] DEBUG: Retrieving session for ID 'b977cf0574d3692cdb435e45'
2014-01-31 17:18:08,941 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/admin'">
2014-01-31 17:18:08,950 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2014-01-31 17:18:08,953 Trac[session] DEBUG: Retrieving session for ID 'b977cf0574d3692cdb435e45'
2014-01-31 17:18:08,960 Trac[chrome] DEBUG: Prepare chrome data for request
2014-01-31 17:18:08,983 Trac[chrome] DEBUG: Prepare chrome data for request
2014-01-31 17:18:09,358 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/chrome/site/your_project_logo.png'">
2014-01-31 17:18:09,364 Trac[chrome] WARNING: File your_project_logo.png not found in any of ['c:\\trac\\stimulant\\htdocs']
2014-01-31 17:18:09,365 Trac[main] WARNING: [10.0.28.199] HTTPNotFound: 404 Not Found (File your_project_logo.png not found)
2014-01-31 17:18:09,365 Trac[session] DEBUG: Retrieving session for ID 'b977cf0574d3692cdb435e45'
2014-01-31 17:18:09,368 Trac[chrome] DEBUG: Prepare chrome data for request

comment:3 Changed 11 years ago by Jun Omae

Even if a component is disabled, Trac shows DEBUG: Loading ... line.

Ah, source of Trac environment needs tracmigrate.* = enabled configuration. Do you enable in trac.ini of dot-trac-20140130\dot? The trac.log is c:\trac\stimulant\log\trac.log?

$ trac-admin /path/to/source-tracenv migrate /path/to/destination-tracenv new-dburi

comment:4 Changed 11 years ago by endquote

Got it -- I added it to the config of the source environment. Now this:

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot migrate c:\
trac\stimulant postgres://trac:oMg8VY@localhost:5432/trac?schema=trac
WindowsError: [Error 183] Cannot create a file when that file already exists: u'
c:\\trac\\stimulant\\log'

Ok, so I delete the log directory -- nothing important in there. Then:

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot migrate c:\
trac\stimulant postgres://trac:oMg8VY@localhost:5432/trac?schema=trac
WindowsError: [Error 183] Cannot create a file when that file already exists: u'
c:\\trac\\stimulant\\htdocs'

Ok, well htdocs was empty anyway, so delete that.

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot migrate c:\
trac\stimulant postgres://trac:oMg8VY@localhost:5432/trac?schema=trac
WindowsError: [Error 183] Cannot create a file when that file already exists: u'
c:\\trac\\stimulant\\plugins'

I see where this is going... it looks like I can't really have anything in my existing environment if I migrate? This is actually a problem, because in addition to migrating from one install to another, and from sqlite to postgres, I'm hoping to migrate multiple projects into one environment managed by SimpleMultiProject.

Perhaps this is not possible, and I'll need to migrate all my projects to separate environments, and then merge them somehow.

comment:5 Changed 11 years ago by endquote

If I migrate to a new environment it seems to work correctly.

C:\Users\trac>trac-admin C:\Users\trac\Desktop\dot-trac-20140130\dot migrate c:\
trac\dot postgres://trac:oMg8VY@localhost:5432/trac?schema=dot
Copying tables:
  attachment table... 42 records.
  auth_cookie table... 0 records.
  cache table... 0 records.
  component table... 10 records.
  enum table... 13 records.
  milestone table... 8 records.
  node_change table... 3 records.
  permission table... 651 records.
  report table... 12 records.
  repository table... 3 records.
  revision table... 1 records.
  session table... 17 records.
  session_attribute table... 67 records.
  ticket table... 405 records.
  ticket_change table... 3180 records.
  ticket_custom table... 810 records.
  version table... 2 records.
  wiki table... 57 records.
Copying directories:
  files directory... done.
  htdocs directory... done.
  templates directory... done.
  plugins directory... done.

comment:6 in reply to:  5 Changed 11 years ago by Jun Omae

Replying to endquote:

If I migrate to a new environment it seems to work correctly.

Yes. The migrate feature creates a new environment because all records and files will be copied.

comment:7 Changed 11 years ago by endquote

Resolution: invalid
Status: newclosed

Understood. Thanks for your help! It seems like the only bug here might be my confusion that the plugin must be enabled in the source environment, not the target.

comment:8 Changed 11 years ago by Jun Omae

Resolution: cantfix
Status: newclosed

It's not known exactly why status of this ticket is still new. Close again.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.