7 Module implementing the version control systems interface to Subversion. |
7 Module implementing the version control systems interface to Subversion. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 import shutil |
11 import shutil |
12 import types |
|
13 import urllib.request, urllib.parse, urllib.error |
12 import urllib.request, urllib.parse, urllib.error |
14 |
13 |
15 from PyQt4.QtCore import * |
14 from PyQt4.QtCore import * |
16 from PyQt4.QtGui import * |
15 from PyQt4.QtGui import * |
17 |
16 |
41 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog |
40 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog |
42 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
41 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
43 from .SvnStatusMonitorThread import SvnStatusMonitorThread |
42 from .SvnStatusMonitorThread import SvnStatusMonitorThread |
44 |
43 |
45 from .ProjectBrowserHelper import SvnProjectBrowserHelper |
44 from .ProjectBrowserHelper import SvnProjectBrowserHelper |
46 from .ProjectHelper import SvnProjectHelper |
|
47 |
45 |
48 import Preferences |
46 import Preferences |
49 import Utilities |
47 import Utilities |
50 |
48 |
51 class Subversion(VersionControl): |
49 class Subversion(VersionControl): |
280 os.mkdir(os.path.join(tmpDir, project, 'branches')) |
278 os.mkdir(os.path.join(tmpDir, project, 'branches')) |
281 os.mkdir(os.path.join(tmpDir, project, 'tags')) |
279 os.mkdir(os.path.join(tmpDir, project, 'tags')) |
282 shutil.copytree(projectDir, os.path.join(tmpDir, project, 'trunk')) |
280 shutil.copytree(projectDir, os.path.join(tmpDir, project, 'trunk')) |
283 else: |
281 else: |
284 shutil.copytree(projectDir, os.path.join(tmpDir, project)) |
282 shutil.copytree(projectDir, os.path.join(tmpDir, project)) |
285 except OSError as e: |
283 except OSError: |
286 if os.path.isdir(tmpDir): |
284 if os.path.isdir(tmpDir): |
287 shutil.rmtree(tmpDir, True) |
285 shutil.rmtree(tmpDir, True) |
288 return False, False |
286 return False, False |
289 |
287 |
290 args = [] |
288 args = [] |
706 accepted = (dlg.exec_() == QDialog.Accepted) |
704 accepted = (dlg.exec_() == QDialog.Accepted) |
707 if accepted: |
705 if accepted: |
708 target, force = dlg.getData() |
706 target, force = dlg.getData() |
709 |
707 |
710 if accepted: |
708 if accepted: |
711 isdir = os.path.isdir(name) |
|
712 args = [] |
709 args = [] |
713 args.append('move') |
710 args.append('move') |
714 self.addArguments(args, opts) |
711 self.addArguments(args, opts) |
715 if force: |
712 if force: |
716 args.append('--force') |
713 args.append('--force') |