Commits

sfink committed b543bbb

Fix directory-dependence of my 'exclude' pattern, which caused qcrefresh to misbehave if not running from the directory that contained all modified files (!)

Comments (0)

Files changed (1)

     usage.
     '''
 
+    # Note: if the record operation (or subsequent refresh) fails partway
+    # through, the top applied patch will be emptied and the working directory
+    # will contain all of its changes.
+
     try:
         mq = extensions.find('mq')
     except KeyError:
     def refreshmq(ui, repo, *pats, **opts):
         mq.refresh(ui, repo, *pats, **opts)
 
-    # If the record operation (or subsequent refresh), the top applied patch
-    # will be emptied and the working directory will contain all of its
-    # changes.
-    clearopts = { 'exclude': '*', 'message': '' }
+    # Cannot use the simple pattern '*' because it will resolve relative to the
+    # current working directory
+    clearopts = { 'exclude': ["re:."], 'message': "" }
+
     mq.refresh(ui, repo, **clearopts)
     dorecord(ui, repo, refreshmq, *pats, **opts)