Alan Franzoni avatar Alan Franzoni committed cc988ab

Enh: support disabling skipping.

Comments (0)

Files changed (2)

     [hgskipcommit]
     pattern = path:.idea path:nbproject path:.project path:.settings glob:*.iml
 
+
+### options
+
+You can pass the `--everything` flag to prevent the extension from applying its
+exclusion patterns.
+
 ### pattern syntax
 
 pattern syntax just follows [mercurial patterns](http://www.selenic.com/mercurial/hg.1.html#file-name-patterns) - see `hg help patterns' 
 
 from mercurial import commands, extensions
 from mercurial.node import nullrev
+from mercurial.i18n import _
 
 def is_merge_commit(repo):
     parent1 = repo[None].p1()
     return (parent1.branch()) != (parent2.branch())
 
 def wrapped_commit(orig, ui, repo, *args, **kwargs):
-    if not args and (not is_merge_commit(repo)):
+    if not args and (not is_merge_commit(repo)) and ("everything" not in
+            kwargs):
         kwargs["exclude"].extend(ui.configlist("hgskipcommit", "pattern", []))
 
     return orig(ui, repo, *args, **kwargs)
 
 def extsetup():
-    extensions.wrapcommand(commands.table, "commit", wrapped_commit)
+    entry = extensions.wrapcommand(commands.table, "commit", wrapped_commit)
+    entry[1].extend([('', 'everything', None, _("commit everything, i.e. don't "
+        "skip"))])
 
 
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.