~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to utilities/migrater/migrater.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-10-17 00:04:32 UTC
  • mfrom: (9668.6.4 package-link-validation)
  • Revision ID: launchpad@pqm.canonical.com-20091017000432-xatnq82k1hhe1euf
[r=adeuring][ui=none][bug 453212] Move packaging from
        canonical.launchpad to lp.registry. Currently listening to
        Placebo -- This Picture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    svc='services',
34
34
    tes='testing',
35
35
    tra='translations',
 
36
    pkg='registry',
36
37
    )
37
38
 
38
39
RENAME_MAP = dict(
108
109
 
109
110
COLLIDED = []
110
111
 
 
112
 
111
113
def move_it(old_path, new_path):
112
114
    """Move a versioned file without colliding with another file."""
113
115
    # Move the file and fix the imports.  LBYL.
233
235
        # All unit tests except to browser unit tests move to the app
234
236
        # tests dir.
235
237
        new_path = os.sep.join(
236
 
            path_part for path_part in path.split(os.sep)
237
 
            if path_path not in unsupported_dirs)
 
238
            path_part for path_part in new_path.split(os.sep)
 
239
            if path_part not in unsupported_dirs)
238
240
    # Create new_path's directory if it doesn't exist yet.
239
241
    try:
240
242
        test_dir, dummy = os.path.split(new_path)
586
588
            path, file_name = os.path.split(to_path)
587
589
            spew("    to_path = %s", to_path)
588
590
            new_path_to_dir = os.path.join(NEW_TOP, app_name, path)
589
 
            new_path_to_fn  = os.path.join(NEW_TOP, app_name, to_path)
 
591
            new_path_to_fn = os.path.join(NEW_TOP, app_name, to_path)
590
592
            # Special cases.
591
593
            if set(fpath.split(os.sep)) & TEST_PATHS:
592
594
                handle_test(full_path, new_path_to_fn)