sfink avatar 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)

crecord/__init__.py

     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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.