Kiln » largefiles » largefiles-mercurial-truncated changes working towards inclusion in Mercurial
Clone URL:  

Avoid requiring user to set home directory in kilntest.py.

Changeset d84b25afa260

Parent e5b8d71a4977

by David Golub

Changes to one file · Browse files at d84b25afa260 Showing diff from parent e5b8d71a4977 Diff from another changeset...

Change 1 of 2 Show Entire File tests/​kilntest.py Stacked
 
2
3
4
 
5
6
7
 
9
10
11
12
13
14
15
16
 
17
18
19
20
21
22
23
24
25
26
27
 
28
29
30
 
2
3
4
5
6
7
8
 
10
11
12
 
 
 
 
 
13
14
15
16
17
18
 
19
20
21
22
 
23
24
25
26
@@ -2,6 +2,7 @@
 import sys  import os  import time +import getpass  import urllib2  from urllib import urlencode   @@ -9,22 +10,17 @@
 # Your local kiln must have a project Test with a repo group called Test  # A repo test in that group will be created as part of the test and must  # not already exist when the test is initiated. The username and password -# given must have write access to that group. The home path given must -# point to the home directory of a user who has a cookie to access the -# local kiln. You can ensure that the cookie exists by invoking Mercurial -# with the kilnauth extension enabled to clone or pull a repository from the -# local kiln and entering a valid username and password if prompted. +# given must have write access to that group.    KILNAUTHPATH = '/code/kiln/2-0/extensions/kilnauth.py'  KILNURL = 'http://localhost/FogBugz/kiln'  USER = 'test'  PASSWORD = 'tester' -HOMEPATH = '/home/username'    # Ensure that the home directory is set appropriately so that the kilnauth  # cookies will be found. This is important because Mercurial 1.9 and later  # changes the home directory in the test script. -os.environ['HOME'] = HOMEPATH +os.environ['HOME'] = os.path.expanduser('~' + getpass.getuser());    def api(url):   return KILNURL + '/api/1.0/' + url