-'''exclude-changesets is a Mercurial extension which sets up a pretxncommit hook.
+'''excludechangesets is a Mercurial extension which sets up a pretxncommit hook.
Any changesets to be pushed / pulled / bundled into the repository will have their
changeset hashes compared against a list of excluded hashes in repo/.excludedchangesets.
If any new hash is already in this file of excluded hashes then the entire
changegroup will be rejected.
-Enable the exclude-changesets just like any other Mercurial extension by adding the
+Enable the excludechangesets just like any other Mercurial extension by adding the
-exclude-changesets = /path/to/exclude-changesets
+excludechangesets = /path/to/excludechangesets
def colateChildren(ctx, colation = set()):
- children = ctx.children()
- for childCtx in children:
- if not childCtx.hex() in colation:
- colateChildren(childCtx, colation)
+ while len(testSet) > 0:
+ revCtxHex = revCtx.hex()
+ if not revCtxHex in colation:
def checkForExcludedChangesets(ui, repo, **kwargs):
return False # No excluded changesets were found. The changegroup addition can go ahead.
- ui.setconfig("hooks", "pretxnchangegroup.exclude-changesets", checkForExcludedChangesets)
+ ui.setconfig("hooks", "pretxnchangegroup.excludechangesets", checkForExcludedChangesets)