Changeset 16ddae63ea9e…
Parent 640bc4baf39f…
by
Changes to one file · Browse files at 16ddae63ea9e Showing diff from parent 640bc4baf39f Diff from another changeset...
@@ -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)
|
Loading...