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

Switch to unified view

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