paster: cleanup-repos always tries to dele in repo-root

Issue #756 resolved
Kyrodan created an issue

If I run 'cleanup-repos' it starts and shows me all deleted repos. I confirm deletion with "y" and it starts to delete all stated repos. But: it tries to delete all deleted repos in my repository root rather than in correct group folder.

The following error message appears:

2013-02-06 14:11:08.573 INFO  [rhodecode.model] initializing db for mysql://rhodecode:XXXXX@localhost/rhodecode
removing all [1] deleted repos
are you sure to remove listed repos
rm__20130129_092929_893550__ds_test4 removed on 2013-01-29 09:29:29 [y/n]?y
removing repository rm__20130129_092929_893550__ds_test4
Traceback (most recent call last):
  File "/opt/rhodecode/venv/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/opt/rhodecode/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/opt/rhodecode/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/opt/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/lib/utils.py", line 673, in run
    return super(BasePasterCommand, self).run(args[1:])
  File "/opt/rhodecode/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/opt/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/lib/cleanup.py", line 124, in command
    shutil.rmtree(os.path.join(repos_location, name))
  File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 235, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/opt/repositories/rm__20130129_092929_893550__ds_test4'

Comments (1)

  1. Log in to comment