Page MenuHomeSoftware Heritage
Paste P947

mercurial errors when no repository is found
ActivePublic

Authored by ardumont on Feb 11 2021, 6:42 PM.
In [19]: exc
Out[19]:
hglib.error.CommandError('hg',
'clone',
b'--',
'https://github.com/jsbsan/mozilla-festival')
In [20]: str(exc)
Out[20]: '(255, b\'\', b\'abort: \\\'https://github.com/jsbsan/mozilla-festival\\\' does not appear to be an hg repository:\\n---%<--- (text/html; charset=utf-8)\\n\\n\\n\\n\\n\\n\\n<!DOCTYPE html>\\n<html lang="en">\\n <head>\\n <meta charset="utf-8">\\n <link rel="dns-prefetch" href="https://github.githubassets.com">\\n <link rel="dns-prefetch" href="https://avatars.githubusercontent.com">\\n <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">\\n <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">\\n\\n\\n\\n <link crossorigin="anonymous" media="all" integrity="sha512-rF3cnLJE5IkKUWFkw54emxUMV82DhbZ9aJun83zhvBgJ7J7ZXC20bEFVuLY9RRRC60Ig+pHQO57DuYBrYO+cAA==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-ac5ddc9cb244e4890a516164c39e1e9b.css" />\\n <link crossorigin="anonymous" media="all" integrity="sha512-tO1butB3aXG+Ab9M+171Fjde3B2uzMU0DEAKzjbXJ0GLJWfiaIVEhM9QS3/G9Ck32IEZLmaSTscoyA9Z66IglQ==" rel="stylesheet" href="https://github.githubassets.com/assets/site-b4ed5bbad0776971be01bf4cfb5ef516.css" />\\n <link crossorigin="anonymous" media="all" integrity="sha512-QbKgFXj+JoU12QsMYLRWqW9sWAzGHCCMC7FlsHunxzfLL4jGwfsmyAtbn4F/deHyB\\n---%<---\')'
In [21]: exc.args
Out[21]: ('hg', 'clone', b'--', 'https://github.com/jsbsan/mozilla-festival')
In [22]: exc.err
Out[22]: b'abort: \'https://github.com/jsbsan/mozilla-festival\' does not appear to be an hg repository:\n---%<--- (text/html; charset=utf-8)\n\n\n\n\n\n\n<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8">\n <link rel="dns-prefetch" href="https://github.githubassets.com">\n <link rel="dns-prefetch" href="https://avatars.githubusercontent.com">\n <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">\n <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">\n\n\n\n <link crossorigin="anonymous" media="all" integrity="sha512-rF3cnLJE5IkKUWFkw54emxUMV82DhbZ9aJun83zhvBgJ7J7ZXC20bEFVuLY9RRRC60Ig+pHQO57DuYBrYO+cAA==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-ac5ddc9cb244e4890a516164c39e1e9b.css" />\n <link crossorigin="anonymous" media="all" integrity="sha512-tO1butB3aXG+Ab9M+171Fjde3B2uzMU0DEAKzjbXJ0GLJWfiaIVEhM9QS3/G9Ck32IEZLmaSTscoyA9Z66IglQ==" rel="stylesheet" href="https://github.githubassets.com/assets/site-b4ed5bbad0776971be01bf4cfb5ef516.css" />\n <link crossorigin="anonymous" media="all" integrity="sha512-QbKgFXj+JoU12QsMYLRWqW9sWAzGHCCMC7FlsHunxzfLL4jGwfsmyAtbn4F/deHyB\n---%<---\n\n'
In [23]: try:
...: hglib.clone("https://gothub.com/jsbsan/mozilla-festival")
...: except Exception as e:
...: exc2 = e
...:
In [24]: exc2
Out[24]:
hglib.error.CommandError('hg',
'clone',
b'--',
'https://gothub.com/jsbsan/mozilla-festival')
In [25]: exc2.err
Out[25]: b'abort: gothub.com certificate error: certificate is for shortener.secureserver.net, www.shortener.secureserver.net\n(set hostsecurity.gothub.com:certfingerprints=sha256:70:b4:fc:cc:f1:cb:57:0e:fe:f0:26:ef:78:79:70:f3:61:91:46:dd:89:04:ff:c1:2d:5e:9b:74:9c:e6:b2:96 config setting or use --insecure to connect insecurely)\n'
In [26]: try:
...: hglib.clone("https://nawak.com/jsbsan/mozilla-festival")
...: except Exception as e:
...: exc2 = e
...:
In [27]: exc2
Out[27]:
hglib.error.CommandError('hg',
'clone',
b'--',
'https://nawak.com/jsbsan/mozilla-festival')
In [28]: exc2.err
Out[28]: b'abort: HTTP Error 404: Not Found\n'
In [29]: try:
...: hglib.clone("http://unkno.org/")
...: except Exception as e:
...: exc3 = e
...:
...:
In [30]: exc3
Out[30]: hglib.error.CommandError('hg', 'clone', b'--', 'http://unkno.org/')
In [31]: exc3.err
Out[31]: b'abort: error: Name or service not known\n'
In [32]: exc3
Out[32]: hglib.error.CommandError('hg', 'clone', b'--', 'http://unkno.org/')