changeset 3004:ac74046f8f58

qrefresh: exit with status 1 if no patches applied.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 22 Aug 2006 15:14:35 -0700
parents 78fe7e2c2e1e
children 18c661e9abd9
files hgext/mq.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Tue Aug 22 14:03:10 2006 -0700
+++ b/hgext/mq.py	Tue Aug 22 15:14:35 2006 -0700
@@ -916,7 +916,7 @@
     def refresh(self, repo, pats=None, **opts):
         if len(self.applied) == 0:
             self.ui.write("No patches applied\n")
-            return
+            return 1
         wlock = repo.wlock()
         self.check_toppatch(repo)
         (top, patch) = (self.applied[-1].rev, self.applied[-1].name)
@@ -1450,9 +1450,9 @@
         patch = q.applied[-1].name
         (message, comment, user, date, hasdiff) = q.readheaders(patch)
         message = ui.edit('\n'.join(message), user or ui.username())
-    q.refresh(repo, pats, msg=message, **opts)
+    ret = q.refresh(repo, pats, msg=message, **opts)
     q.save_dirty()
-    return 0
+    return ret
 
 def diff(ui, repo, *pats, **opts):
     """diff of the current patch"""