diff hgext/qsync.py @ 251:a60d11973ff3

[qsync] abort properly of a patches repository does not exists
author David Douard <david.douard@logilab.fr>
date Wed, 30 May 2012 14:17:33 +0200 (2012-05-30)
parents bd0917068cc7
children 9bb4217ddfce
line wrap: on
line diff
--- a/hgext/qsync.py
+++ b/hgext/qsync.py
@@ -58,6 +58,9 @@
     if opts['review_all']:
         review = 'all'
     mqrepo = repo.mq.qrepo()
+    if mqrepo is None:
+        raise util.Abort('No patches repository')
+
     try:
         parent = mqrepo[BRANCHNAME]
     except error.RepoLookupError: