aboutsummaryrefslogblamecommitdiffstats
path: root/doc/spam.txt
blob: e201bf2c47b5a67d01407d85f99c133413825fe2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12



                 
                                                                 






                                                                      










                                                                        
                                                                        
                                                                        














                                                            

                                                            




                                                                      
                                               




                                                                     

                                                                


                                                                           

                                                      




                                                                     
                                                                     

                                                                 
*****************
Dealing with spam
*****************

In the case that some spam or inappropriate comment makes its way
through you interface, you can (sometimes) remove the offending commit
``XYZ``.


If the offending commit is the last commit
==========================================

+-------+--------------------------------------------------------------+
| arch  |                                                              |
+-------+--------------------------------------------------------------+
| bzr   | bzr uncommit && bzr revert                                   |
+-------+--------------------------------------------------------------+
| darcs | darcs obliterate --last=1                                    |
+-------+--------------------------------------------------------------+
| git   | git reset --hard HEAD^                                       |
+-------+--------------------------------------------------------------+
| hg    | hg rollback && hg revert                                     |
+-------+--------------------------------------------------------------+
| mtn   | mtn db kill_rev_locally $(mtn automate get_base_revision_id) |
+-------+--------------------------------------------------------------+

If the offending commit is not the last commit
==============================================

+----------+-----------------------------------------------+
| arch     |                                               |
+----------+-----------------------------------------------+
| bzr [#]_ | bzr rebase -r <XYZ+1>..-1 --onto before:XYZ . |
+----------+-----------------------------------------------+
| darcs    | darcs obliterate --matches 'name XYZ'         |
+----------+-----------------------------------------------+
| git      | git rebase --onto XYZ~1 XYZ                   |
+----------+-----------------------------------------------+
| hg [#]_  |                                               |
+----------+-----------------------------------------------+
| mtn [#]_ |                                               |
+----------+-----------------------------------------------+

.. [#] Requires the ```bzr-rebase`` plugin`_.  Note, you have to
   increment ``XYZ`` by hand for ``<XYZ+1>``, because ``bzr`` does not
   support ``after:XYZ``.

.. [#] From `Mercurial: The Definitive Guide`_:

     "Mercurial also does not provide a way to make a file or
     changeset completely disappear from history, because there is no
     way to enforce its disappearance"

.. [#] See `Rebuilding ancestry`_ in the Monotone documentation.

.. _bzr-rebase plugin: http://wiki.bazaar.canonical.com/Rebase
.. _Mercurial: The Definitive Guide:
  http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#id394667
.. _Rebuilding ancestry:
  http://www.monotone.ca/docs/Rebuilding-ancestry.html

Warnings about changing history
===============================

Note that all of these *change the repo history* , so only do this on
your interface-specific repo before it interacts with any other repo.
Otherwise, you'll have to survive by cherry-picking only the good
commits.