~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to utilities/migrater/rename_module.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-25 08:55:37 UTC
  • mfrom: (13287.1.8 bug-800652)
  • Revision ID: launchpad@pqm.canonical.com-20110625085537-moikyoo2pe98zs7r
[r=jcsackett, julian-edwards][bug=800634,
        800652] Enable and display overrides on sync package uploads.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
from bzrlib import workingtree
32
32
from find import find_matches
33
 
from utils import (
34
 
    fail,
35
 
    log,
36
 
    )
 
33
from utils import fail, log
37
34
 
38
35
 
39
36
def file2module(module_file):
49
46
# Cache the working tree for speed.
50
47
_wt = workingtree.WorkingTree.open('.')
51
48
 
52
 
 
53
49
def bzr_move_file(src_file, target):
54
50
    """Move or rename a versioned file or directory."""
55
51
    if os.path.isdir(target):
63
59
    "Version a list of paths."
64
60
    _wt.add(paths)
65
61
 
66
 
 
67
62
def bzr_remove_file(filename):
68
63
    """Remove a versioned file."""
69
64
    _wt.remove([filename], keep_files=False, force=True)
96
91
    """
97
92
    source = r'\b%s\b' % source_module.replace('.', '\\.')
98
93
    target = target_module
99
 
    root_dirs = [
100
 
        'cronscripts', 'scripts', 'database', 'lib/canonical', 'lib/lp']
 
94
    root_dirs = ['cronscripts', 'lib/canonical', 'lib/lp']
101
95
    file_pattern = '\.(py|txt|zcml)$'
102
96
    print "    Updating references:"
103
97
    for root_dir in root_dirs: