Merge branch 'fc/remote-testgit-feature-done'
In the longer term, tightening rules is a good thing to do, and because nobody who has worked in the remote helper area seems to be interested in reviewing this, I would assume they do not think such a retroactive tightening will affect their remote helpers. So let's advance this topic to see what happens. * fc/remote-testgit-feature-done: remote-testgit: properly check for errorsmaint
commit
6f3f710127
|
@ -164,6 +164,11 @@ def do_import(repo, args):
|
||||||
ref = line[7:].strip()
|
ref = line[7:].strip()
|
||||||
refs.append(ref)
|
refs.append(ref)
|
||||||
|
|
||||||
|
print "feature done"
|
||||||
|
|
||||||
|
if os.environ.get("GIT_REMOTE_TESTGIT_FAILURE"):
|
||||||
|
die('Told to fail')
|
||||||
|
|
||||||
repo = update_local_repo(repo)
|
repo = update_local_repo(repo)
|
||||||
repo.exporter.export_repo(repo.gitdir, refs)
|
repo.exporter.export_repo(repo.gitdir, refs)
|
||||||
|
|
||||||
|
@ -177,6 +182,9 @@ def do_export(repo, args):
|
||||||
if not repo.gitdir:
|
if not repo.gitdir:
|
||||||
die("Need gitdir to export")
|
die("Need gitdir to export")
|
||||||
|
|
||||||
|
if os.environ.get("GIT_REMOTE_TESTGIT_FAILURE"):
|
||||||
|
die('Told to fail')
|
||||||
|
|
||||||
update_local_repo(repo)
|
update_local_repo(repo)
|
||||||
changed = repo.importer.do_import(repo.gitdir)
|
changed = repo.importer.do_import(repo.gitdir)
|
||||||
|
|
||||||
|
|
|
@ -145,4 +145,25 @@ test_expect_failure 'push new branch with old:new refspec' '
|
||||||
compare_refs clone HEAD server refs/heads/new-refspec
|
compare_refs clone HEAD server refs/heads/new-refspec
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'proper failure checks for fetching' '
|
||||||
|
(GIT_REMOTE_TESTGIT_FAILURE=1 &&
|
||||||
|
export GIT_REMOTE_TESTGIT_FAILURE &&
|
||||||
|
cd localclone &&
|
||||||
|
test_must_fail git fetch 2>&1 | \
|
||||||
|
grep "Error while running fast-import"
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
|
# We sleep to give fast-export a chance to catch the SIGPIPE
|
||||||
|
test_expect_failure 'proper failure checks for pushing' '
|
||||||
|
(GIT_REMOTE_TESTGIT_FAILURE=1 &&
|
||||||
|
export GIT_REMOTE_TESTGIT_FAILURE &&
|
||||||
|
GIT_REMOTE_TESTGIT_SLEEPY=1 &&
|
||||||
|
export GIT_REMOTE_TESTGIT_SLEEPY &&
|
||||||
|
cd localclone &&
|
||||||
|
test_must_fail git push --all 2>&1 | \
|
||||||
|
grep "Error while running fast-export"
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in New Issue