Merged Anton Batenev's report of Nicolas Alvarez' unicode-in-be-new bug
[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
25 If the offending commit is not the last commit
26 ==============================================
27
28 +----------+-----------------------------------------------+
29 | arch     |                                               |
30 +----------+-----------------------------------------------+
31 | bzr [#]_ | bzr rebase -r <XYZ+1>..-1 --onto before:XYZ . |
32 +----------+-----------------------------------------------+
33 | darcs    | darcs obliterate --matches 'name XYZ'         |
34 +----------+-----------------------------------------------+
35 | git      | git rebase --onto XYZ~1 XYZ                   |
36 +----------+-----------------------------------------------+
37 | hg [#]_  |                                               |
38 +----------+-----------------------------------------------+
39
40 .. [#] Requires the ```bzr-rebase`` plugin`_.  Note, you have to
41    increment ``XYZ`` by hand for ``<XYZ+1>``, because ``bzr`` does not
42    support ``after:XYZ``.
43
44 .. [#] From `Mercurial: The Definitive Guide`:
45
46      "Mercurial also does not provide a way to make a file or
47      changeset completely disappear from history, because there is no
48      way to enforce its disappearance"
49
50 .. _bzr-rebase plugin: http://wiki.bazaar.canonical.com/Rebase
51 .. _Mercurial: The Definitive Guide:
52   http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#id394667
53
54 Warnings about changing history
55 ===============================
56
57 Note that all of these *change the repo history* , so only do this on
58 your interface-specific repo before it interacts with any other repo.
59 Otherwise, you'll have to survive by cherry-picking only the good
60 commits.