Kiln » TortoiseHg » MacBuild
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Add push/pull support to the build script.

Changeset 16ddae63ea9e

Parent 640bc4baf39f

by David Golub

Changes to one file · Browse files at 16ddae63ea9e Showing diff from parent 640bc4baf39f Diff from another changeset...

Change 1 of 4 Show Entire File setup.py Stacked
 
23
24
25
 
26
27
28
 
39
40
41
42
 
43
44
 
 
45
46
47
 
50
51
52
53
 
 
54
55
56
 
59
60
61
 
 
62
63
64
 
 
65
66
67
 
 
 
 
 
 
68
69
70
 
 
71
72
73
 
23
24
25
26
27
28
29
 
40
41
42
 
43
44
45
46
47
48
49
50
 
53
54
55
 
56
57
58
59
60
 
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
 
 
83
84
85
86
87
@@ -23,6 +23,7 @@
 # default to TortoiseHg stable build config  hgbranch = 'stable'  thgbranch = 'stable' +dopull = None    def run(cmd, cwd='.', hide=False, env=installenv):   if not hide: @@ -39,9 +40,11 @@
  cmd = ' '.join([sys.executable, cmd])   run(cmd, cwd, hide, env)   -def checkrepo(name, ver=''): +def checkrepo(name, ver='', dopull=False):   if not os.path.isdir(name):   run(r'hg clone -U %s file:%s' % (URL[name], name)) + elif dopull: + run(r'hg pull -R %s' % name)   run(r'hg update -C -R %s %s' % (name, ver))    def copywithperms(src, dest): @@ -50,7 +53,8 @@
   try:   opts, args = getopt.getopt(sys.argv[1:], 'h', - ['thg-stable', 'thg-unstable', 'thg-fogcreek', 'help']) + ['thg-stable', 'thg-unstable', 'thg-fogcreek', + 'pull', 'nopull', 'help'])  except getopt.error, msg:   pass   @@ -59,15 +63,25 @@
  if opt == '--thg-stable':   hgbranch = 'stable'   thgbranch = 'stable' + if dopull is None: + dopull = True   elif opt == '--thg-unstable':   hgbranch = 'default'   thgbranch = 'default' + if dopull is None: + dopull = True   elif opt == '--thg-fogcreek':   hgbranch = 'stable'   thgbranch = 'fogcreek' + if dopull is None: + dopull = False + elif opt == 'pull': + dopull = True + elif opt == 'nopull': + dopull = False   -checkrepo('hg', hgbranch) -checkrepo('thg', thgbranch) +checkrepo('hg', hgbranch, dopull) +checkrepo('thg', thgbranch, dopull)    print 'Copying QT plugins from %s' % qtplugindir  shutil.rmtree('dist/TortoiseHg.app', ignore_errors=True)