Commits

Alan Franzoni committed cc988ab

Enh: support disabling skipping.

  • Participants
  • Parent commits a44d7cb

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' 

File hgskipcommit.py

 
 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"))])