Changeset - 52e689b37700
[Not reviewed]
default
0 1 0
domruf - 9 years ago 2017-04-27 20:29:28
dominikruf@gmail.com
tests: use relative path when adding file to git repo (fixes error with newer git versions)

Newer git versions would fail 'git add /path/to/file' with:
fatal: /path/to/file: '/path/to/file' is outside repository
That caused test_push_unlocks_repository_git to fail.

To fix that, use relative instead of absolute path.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/manual_test_vcs_operations.py
Show inline comments
 
@@ -110,15 +110,15 @@ def _add_files_and_push(vcs, DEST, **kwa
 
    vcs is git or hg and defines what VCS we want to make those files for
 

	
 
    :param vcs:
 
    :param DEST:
 
    """
 
    # commit some stuff into this repo
 
    cwd = path = os.path.join(DEST)
 
    #added_file = os.path.join(path, '%ssetupążźć.py' % _RandomNameSequence().next())
 
    added_file = os.path.join(path, '%ssetup.py' % _RandomNameSequence().next())
 
    cwd = os.path.join(DEST)
 
    #added_file = '%ssetupążźć.py' % _RandomNameSequence().next()
 
    added_file = '%ssetup.py' % _RandomNameSequence().next()
 
    Command(cwd).execute('touch %s' % added_file)
 
    Command(cwd).execute('%s add %s' % (vcs, added_file))
 

	
 
    email = 'me@example.com'
 
    if os.name == 'nt':
 
        author_str = 'User <%s>' % email
0 comments (0 inline, 0 general)