Diff of /trunk/cforge/cforge/Package/CFORGE/Scripts/update.py [r61] .. [r62]  Maximize  Restore

Switch to unified view

a/trunk/cforge/cforge/Package/CFORGE/Scripts/update.py b/trunk/cforge/cforge/Package/CFORGE/Scripts/update.py
1
import sys, os
1
import sys, os
2
import cds_script
2
import cds_script
3
import ui
3
import ui
4
4
import ntpath
5
5
6
# This is a cforge command (script file)
6
# This is a cforge command (script file)
7
# this will be run as ironpython script.
7
# this will be run as ironpython script.
8
# the filename of this script is automatically the corresponding cforge command 
8
# the filename of this script is automatically the corresponding cforge command 
9
# with some magic functions you can easily integrate it nicely into cforge tool
9
# with some magic functions you can easily integrate it nicely into cforge tool
...
...
21
if len(sys.argv) <= 1:
21
if len(sys.argv) <= 1:
22
    print("Oh, there are no arguments. Perhaps you forgot something?")
22
    print("Oh, there are no arguments. Perhaps you forgot something?")
23
    sys.exit()
23
    sys.exit()
24
24
25
folder = sys.argv[1]
25
folder = sys.argv[1]
26
# if folder can't be found, try to interpret it as a repo
27
# name, relatively to the workspace folder
28
if not os.path.isdir(folder):
29
    config = ui.GetSettings()
30
    workspace, file = ntpath.split(config['folder'])
31
    folder = os.path.join(workspace, folder)
32
33
print("updating folder: %s" % folder)
26
config = ui.Dialog("Update", Credentials=True)
34
config = ui.Dialog("Update", Credentials=True)
27
35
28
if config != None:
36
if config != None:
29
    scriptpath = os.path.abspath(os.path.dirname(sys.argv[0]))
37
    scriptpath = os.path.abspath(os.path.dirname(sys.argv[0]))
30
    scriptname = os.path.join(scriptpath, "action.svn.update.py")
38
    scriptname = os.path.join(scriptpath, "action.svn.update.py")
...
...
32
40
33
    cds_script.RunCodesysWithScript(scriptname, scriptargs, False)
41
    cds_script.RunCodesysWithScript(scriptname, scriptargs, False)