From 1ef928807e28a96a6e2904c200e1853072ccc854 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 22 Sep 2011 14:16:04 +0200 Subject: [PATCH] hg import fix --- apps/catalogue/migrations/0002_from_hg.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/catalogue/migrations/0002_from_hg.py b/apps/catalogue/migrations/0002_from_hg.py index 51b12963..b19df625 100644 --- a/apps/catalogue/migrations/0002_from_hg.py +++ b/apps/catalogue/migrations/0002_from_hg.py @@ -158,15 +158,15 @@ class Migration(DataMigration): try: hg_path = settings.WIKI_REPOSITORY_PATH except: - pass - - print 'migrate from', hg_path - repo = hg.repository(ui.ui(), hg_path) - tip = repo['tip'] - for fname in tip: - if fname.startswith('.') or not fname.startswith('a'): - continue - migrate_file_from_hg(orm, fname, tip[fname]) + print 'repository not configured, skipping' + else: + print 'migrate from', hg_path + repo = hg.repository(ui.ui(), hg_path) + tip = repo['tip'] + for fname in tip: + if fname.startswith('.') or not fname.startswith('a'): + continue + migrate_file_from_hg(orm, fname, tip[fname]) def backwards(self, orm): -- 2.20.1