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

Parse command line to determine which branch to build.

Changeset 89afd9ca662c

Parent 9f73cf858877

by David Golub

Changes to one file · Browse files at 89afd9ca662c Showing diff from parent 9f73cf858877 Diff from another changeset...

Change 1 of 3 Show Entire File setup.py Stacked
 
8
9
10
 
11
12
13
 
19
20
21
 
 
 
22
23
24
 
35
36
37
38
39
40
41
 
 
 
42
43
44
45
46
47
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
50
51
 
8
9
10
11
12
13
14
 
20
21
22
23
24
25
26
27
28
 
39
40
41
 
 
 
 
42
43
44
45
46
47
48
49
 
 
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@@ -8,6 +8,7 @@
 import subprocess  import plistlib  import re +import getopt  print sys.prefix    qtplugindir = '/Developer/Applications/Qt/plugins/imageformats' @@ -19,6 +20,9 @@
   installenv = os.environ   +# default to TortoiseHg stable build config +branch = 'stable' +  def run(cmd, cwd='.', hide=False, env=installenv):   if not hide:   print cwd + ">" + cmd @@ -35,17 +39,29 @@
  run(cmd, cwd, hide, env)    def checkrepo(name, ver=''): - if os.path.isdir(name): - return - run(r'hg clone -U %s file:%s' % (URL[name], name)) - run(r'hg update -R %s %s' % (name, ver)) + if not os.path.isdir(name): + run(r'hg clone -U %s file:%s' % (URL[name], name)) + run(r'hg update -C -R %s %s' % (name, ver))    def copywithperms(src, dest):   shutil.copyfile(src, dest)   shutil.copymode(src, dest)   -checkrepo('hg') -checkrepo('thg') +try: + opts, args = getopt.getopt(sys.argv[1:], 'h', + ['thg-stable', 'thg-unstable', 'help']) +except getopt.error, msg: + pass + +# parse options +for opt, arg in opts: + if opt == '--thg-stable': + branch = 'stable' + elif opt == '--thg-unstable': + branch = 'default' + +checkrepo('hg', branch) +checkrepo('thg', branch)    print 'Copying QT plugins from %s' % qtplugindir  shutil.rmtree('dist/TortoiseHg.app', ignore_errors=True)