test: convert to Python 3 compatibility
[be.git] / doc / spam.txt
1 *****************
2 Dealing with spam
3 *****************
4
5 In the case that some spam or inappropriate comment makes its way
6 through you interface, you can (sometimes) remove the offending commit
7 ``XYZ``.
8
9
10 If the offending commit is the last commit
11 ==========================================
12
13 +-------+--------------------------------------------------------------+
14 | arch  |                                                              |
15 +-------+--------------------------------------------------------------+
16 | bzr   | bzr uncommit && bzr revert                                   |
17 +-------+--------------------------------------------------------------+
18 | darcs | darcs obliterate --last=1                                    |
19 +-------+--------------------------------------------------------------+
20 | git   | git reset --hard HEAD^                                       |
21 +-------+--------------------------------------------------------------+
22 | hg    | hg rollback && hg revert                                     |
23 +-------+--------------------------------------------------------------+
24 | mtn   | mtn db kill_rev_locally $(mtn automate get_base_revision_id) |
25 +-------+--------------------------------------------------------------+
26
27 If the offending commit is not the last commit
28 ==============================================
29
30 +----------+-----------------------------------------------+
31 | arch     |                                               |
32 +----------+-----------------------------------------------+
33 | bzr [#]_ | bzr rebase -r <XYZ+1>..-1 --onto before:XYZ . |
34 +----------+-----------------------------------------------+
35 | darcs    | darcs obliterate --matches 'name XYZ'         |
36 +----------+-----------------------------------------------+
37 | git      | git rebase --onto XYZ~1 XYZ                   |
38 +----------+-----------------------------------------------+
39 | hg [#]_  |                                               |
40 +----------+-----------------------------------------------+
41 | mtn [#]_ |                                               |
42 +----------+-----------------------------------------------+
43
44 .. [#] Requires the ```bzr-rebase`` plugin`_.  Note, you have to
45    increment ``XYZ`` by hand for ``<XYZ+1>``, because ``bzr`` does not
46    support ``after:XYZ``.
47
48 .. [#] From `Mercurial, The Definitive Guide`_:
49
50      "Mercurial also does not provide a way to make a file or
51      changeset completely disappear from history, because there is no
52      way to enforce its disappearance"
53
54 .. [#] See `Rebuilding ancestry`_ in the Monotone documentation.
55
56 .. _bzr-rebase plugin: http://wiki.bazaar.canonical.com/Rebase
57 .. _Mercurial, The Definitive Guide:
58   http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#id394667
59 .. _Rebuilding ancestry:
60   http://www.monotone.ca/docs/Rebuilding-ancestry.html
61
62 Warnings about changing history
63 ===============================
64
65 Note that all of these *change the repo history* , so only do this on
66 your interface-specific repo before it interacts with any other repo.
67 Otherwise, you'll have to survive by cherry-picking only the good
68 commits.