kopia lustrzana https://github.com/jupyterhub/repo2docker
Revert "Add handling for no ref being provided"
rodzic
d3286eb4ed
commit
cad9deb7d0
|
@ -144,13 +144,10 @@ class Repo2Docker(Application):
|
||||||
# create a shallow clone first
|
# create a shallow clone first
|
||||||
_clone(depth=50)
|
_clone(depth=50)
|
||||||
|
|
||||||
# ref == None means we want to use HEAD so no need to checkout a
|
if not _contains(ref):
|
||||||
# specific revision
|
# have to create a full clone
|
||||||
if ref is not None:
|
_unshallow()
|
||||||
if not _contains(ref):
|
_checkout(ref)
|
||||||
# have to create a full clone
|
|
||||||
_unshallow()
|
|
||||||
_checkout(ref)
|
|
||||||
|
|
||||||
def get_argparser(self):
|
def get_argparser(self):
|
||||||
argparser = argparse.ArgumentParser()
|
argparser = argparse.ArgumentParser()
|
||||||
|
|
|
@ -51,8 +51,9 @@ class RemoteRepoTest(pytest.Item):
|
||||||
self.verify = verify
|
self.verify = verify
|
||||||
|
|
||||||
def runtest(self):
|
def runtest(self):
|
||||||
if self.ref is not None:
|
subprocess.check_call([
|
||||||
cmd = ['jupyter-repo2docker', '--ref', self.ref, self.url, '--']
|
'jupyter-repo2docker',
|
||||||
else:
|
'--ref', self.ref,
|
||||||
cmd = ['jupyter-repo2docker', self.url, '--']
|
self.url,
|
||||||
subprocess.check_call(cmd + shlex.split(self.verify))
|
'--',
|
||||||
|
] + shlex.split(self.verify))
|
||||||
|
|
|
@ -11,9 +11,3 @@
|
||||||
# we checkout the second to last commit, hence the log has 49 entries at a
|
# we checkout the second to last commit, hence the log has 49 entries at a
|
||||||
# max clone depth of 50
|
# max clone depth of 50
|
||||||
verify: /bin/bash -c '[ $(git log --oneline | wc -l) == "49" ]'
|
verify: /bin/bash -c '[ $(git log --oneline | wc -l) == "49" ]'
|
||||||
|
|
||||||
- name: A dummy repo with 100 commits - live at HEAD
|
|
||||||
url: https://github.com/betatim/repo2docker-ci-clone-depth
|
|
||||||
# provide no ref, aka use HEAD, aka the 100th commit
|
|
||||||
ref: NULL
|
|
||||||
verify: python -c "commit = open('COMMIT').read(); assert int(commit) == 100, 'this is not the 100th commit'"
|
|
||||||
|
|
Ładowanie…
Reference in New Issue