250 project.setDirty(True) |
250 project.setDirty(True) |
251 project.saveProject() |
251 project.saveProject() |
252 project.closeProject() |
252 project.closeProject() |
253 return |
253 return |
254 shutil.rmtree(tmpProjectDir, True) |
254 shutil.rmtree(tmpProjectDir, True) |
|
255 project.closeProject(noSave = True) |
255 project.openProject(pfn) |
256 project.openProject(pfn) |
256 |
257 |
257 def vcsImport(self, vcsDataDict, projectDir, noDialog = False): |
258 def vcsImport(self, vcsDataDict, projectDir, noDialog = False): |
258 """ |
259 """ |
259 Public method used to import the project into the Subversion repository. |
260 Public method used to import the project into the Subversion repository. |
294 return False, False |
295 return False, False |
295 |
296 |
296 locker = QMutexLocker(self.vcsExecutionMutex) |
297 locker = QMutexLocker(self.vcsExecutionMutex) |
297 cwd = os.getcwd() |
298 cwd = os.getcwd() |
298 os.chdir(os.path.join(tmpDir, project)) |
299 os.chdir(os.path.join(tmpDir, project)) |
299 opts = self.options['global'] + self.options['update'] |
300 opts = self.options['global'] |
300 recurse = "--non-recursive" not in opts |
301 recurse = "--non-recursive" not in opts |
301 ignore = "--ignore" in opts |
|
302 url = self.__svnURL(vcsDir) |
302 url = self.__svnURL(vcsDir) |
303 client = self.getClient() |
303 client = self.getClient() |
304 if not noDialog: |
304 if not noDialog: |
305 dlg = \ |
305 dlg = \ |
306 SvnDialog(self.trUtf8('Importing project into Subversion repository'), |
306 SvnDialog(self.trUtf8('Importing project into Subversion repository'), |
307 "import%s%s --message %s ." % \ |
307 "import%s --message %s ." % \ |
308 ((not recurse) and " --non-recursive" or "", |
308 ((not recurse) and " --non-recursive" or "", |
309 ignore and " --ignore" or "", |
|
310 msg), |
309 msg), |
311 client) |
310 client) |
312 QApplication.processEvents() |
311 QApplication.processEvents() |
313 try: |
312 try: |
314 rev = client.import_(".", url, msg, recurse, ignore) |
313 rev = client.import_(".", url, msg, recurse, ignore = True) |
315 status = True |
314 status = True |
316 except pysvn.ClientError as e: |
315 except pysvn.ClientError as e: |
317 status = False |
316 status = False |
318 rev = None |
317 rev = None |
319 if not noDialog: |
318 if not noDialog: |