Commits

Anonymous committed fcf0191

tabs to spaces

Comments (0)

Files changed (4)

bitbucket2github/bitbucket.py

             "name":repo.get('slug'),
             "description":repo.get('description', ''),
             "homepage":repo.get('website', ''),
-			"scm":repo.get('scm', 'hg')
+            "scm":repo.get('scm', 'hg')
         } for repo in response.get('repositories')
     ]
 
                          username=username,
                          password=password,
                          base_url=base_url,
-						 scm="git",
+                         scm="git",
                          description=repo['description'],
                          url=repo['homepage'])
 

bitbucket2github/bitbucket2github.py

 
     github_repo = github_url.format(github_username, repo['name'])
     local_repo = os.path.join(tmp_dir, repo['name'])
-    
+
     if repo['scm'] == "git":
         bitbucket_repo = bitbucket_git_url.format(bitbucket_username, repo['name'])
-		
+
         if os.path.exists(local_repo):
             sh('cd {1}; git fetch {0}'.format(bitbucket_repo, local_repo))
         else:
             sh('git clone --mirror {0} {1}'.format(bitbucket_repo, local_repo))
-        
-        sh('cd {1}; git push --mirror {0}'.format(github_repo, local_repo))		
+
+            sh('cd {1}; git push --mirror {0}'.format(github_repo, local_repo))		
     else:
         bitbucket_repo = bitbucket_url.format(bitbucket_username, repo['name'])
-		
+
         if os.path.exists(local_repo):
             sh('hg pull {0} -R {1}'.format(bitbucket_repo, local_repo))
         else:
             sh('hg clone {0} {1}'.format(bitbucket_repo, local_repo))
-        
+
         sh('hg bookmark master -f -R {0}'.format(local_repo))
         sh('hg push {0} -R {1}'.format(github_repo, local_repo))
 

bitbucket2github/github.py

             "name":repo.name,
             "description":repo.description or '',
             "homepage":repo.homepage or '',
-			"scm":"git",
-			"clone_url":repo.clone_url
+            "scm":"git",
+            "clone_url":repo.clone_url
         }
         for repo in github.repos.list(username).iterator()]
 
 
     reponame = repo['name']
     github = Github(login=username, password=password)
-	
+
     try:
         repo = github.repos.get(user=username, repo=reponame)
     except:

bitbucket2github/github2bitbucket.py

 
     bitbucket_repo = bitbucket_url.format(bitbucket_username, repo['name'])
     local_repo = os.path.join(tmp_dir, repo['name'])
-	
+
     if os.path.exists(local_repo):
-    	sh('cd {1}; git fetch {0}'.format(repo['clone_url'], local_repo))
+        sh('cd {1}; git fetch {0}'.format(repo['clone_url'], local_repo))
     else:
-    	sh('git clone --mirror {0} {1}'.format(repo['clone_url'], local_repo))
-    
+        sh('git clone --mirror {0} {1}'.format(repo['clone_url'], local_repo))
+
     sh('cd {1}; git push --mirror {0}'.format(bitbucket_repo, local_repo))