qclone: do not abort if remote hasn't enabled mq (issue1040)
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 24 Mar 2008 16:17:19 -0300
changeset 6380 a632a9a57821
parent 6379 d2bb66a8a435
child 6381 0b89315d5de2
qclone: do not abort if remote hasn't enabled mq (issue1040)
hgext/mq.py
--- a/hgext/mq.py	Mon Mar 24 13:45:01 2008 -0300
+++ b/hgext/mq.py	Mon Mar 24 16:17:19 2008 -0300
@@ -1616,7 +1616,10 @@
                 destrev = heads.keys()
                 destrev.append(sr.changelog.parents(qbase)[0])
     elif sr.capable('lookup'):
-        qbase = sr.lookup('qbase')
+        try:
+            qbase = sr.lookup('qbase')
+        except RepoError:
+            pass
     ui.note(_('cloning main repo\n'))
     sr, dr = hg.clone(ui, sr.url(), dest,
                       pull=opts['pull'],