1. Jason Harris
  2. hgban

Commits

Jason Harris  committed c6566d3

The wiki text

  • Participants
  • Parent commits 4267766
  • Branches default

Comments (0)

Files changed (1)

File Home.wiki

View file
-== Welcome ==
-
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
-
-=== Wiki features ===
-
-This wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-
-The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
-
-Go ahead and try:
-
-{{{
-$ hg clone http://bitbucket.org/jfh/exclude-changesets/wiki
-}}}
-
-Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
-
-=== Syntax highlighting ===
-
-You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
-
-Here's an example of some Python code:
-
-{{{
-#!python
-
-def wiki_rocks(text):
-	formatter = lambda t: "funky"+t
-	return formatter(text)
-}}}
-
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
-
-Have fun!
+== Exclude Changesets ==
+
+A mercurial extension to exclude specific changesets from a repository.
+
+=== Use Case ===
+
+Imagine that you have a team of people working on a mercurial repository. One of the members of the team pushes a changeset or group of changesets to the central repository but these changesets are "bad" for one reason or another. (Maybe some branch was merged when it should not have been, etc. Maybe some nuclear launch codes were accidentally committed, etc.). Ideally this should never happen. In practice it happens all too frequently. 
+
+So typically the leader of the project will send out an email saying: //Please strip the following revisions from your repositories://
+{{{
+    162a93e027fdcc6f037c80d185eb201e346da0b0
+    69cc2b0e47158d1a571a35ec89c5524b084944c9
+    a4988662d998b8d986bdaec43079475827aa31d0
+}}}
+
+
+The problem is of course that in a team of say 20 people someone might have already pulled the "bad" revisions and they may accidentally miss the email, and re-push these bad revisions back to the central server.
+
+The extension exclude-changesets is intended to prevent such a re-push of these "bad" changesets.
+
+Thus anyone who can change files on the server can simply add the above changeset hashes to the file repo/{{{.excludedchangesets}}} (creating this file if necessary) and if the exclude-changesets extension is configured on the server, then none of the team can accidentally push any group of changesets which contain the changesets excluded in the file repo/{{{.excludedchangesets}}}.
+
+=== Enabling the Exclude Changesets extension ===
+
+The exclude-changesets extension is enabled just like other mercurial extensions. Ie add something like the following to your {{{~/.hgrc}}} file:
+{{{
+[extensions]
+exclude-changesets = /path/to/exclude-changesets.py
+}}}
+
+=== Format of the .excludedchangesets file ===
+
+The {{{.excludedchangesets}}} file is examined line by line by the exclude-changesets extension. The changeset hash should start at the very beginning of the line and anything else on the line is ignored. (In fact if you understand regular expressions each line is matched by "{{{(^[0-9a-fA-F]+).*}}}" and the changeset hash is taken to be {{{\1}}})
+
+Thus the following is a valid {{{.excludedchangeset}}} file:
+{{{
+# Ignore these changesets due to bad branch merge
+162a93e027fdcc6f037c80d185eb201e346da0b0
+69cc2b0e47158d1a571a35ec89c5524b084944c9
+
+# Ignore this changeset because it contains the nuclear launch code that Billy included
+a4988662d998b8d986bdaec43079475827aa31d0 # The "launch" code commit
+}}}