Diff of /trunk/SVN_Plugin/PLC_AC500_V3/_05_svn_commit/svnobj [000000] .. [r5]  Maximize  Restore

Switch to unified view

a b/trunk/SVN_Plugin/PLC_AC500_V3/_05_svn_commit/svnobj
1
Gx_l©!0…jüooŠ4´ZŸ´System.StringL{1b2bcd16-2426-4c4a-bd24-c0ad32e0aa99}ScriptContent„from ScriptEngine import *  #First Line is readonly.
2

3
def set_username(req):
4

5
    res = system.ui.query_credentials("Credentials for SVN Repo")
6
    if res:
7
        ## tuple containing vowels
8
        #vowels = ('a', 'e', 'i', 'o', 'u')
9
        #
10
        ## index of 'e' in vowels
11
        #index = vowels.index('e')
12
        #
13
        #> print(index)
14
        #
15
        #> Output: 1
16

17
        print("Username '%s' and password '%s'" % res) # res is a 2-tuple
18
        req.username = res.index(0)
19
        req.password = res.index(1)
20
    else:
21
        print("Oops.. goodbye")
22
        exit()
23

24
    req.save = False # Optional
25

26
svn.auth_username_password += set_username
27
#svn.commit(message)ScriptFileName 05_svn_commit.py ScriptParametersÐÐ-Ð-