/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/kill-version.txt

  • Committer: Martin Pool
  • Date: 2005-06-28 03:02:31 UTC
  • Revision ID: mbp@sourcefrog.net-20050628030231-d311e4ebcd467ef4
Merge John's import-speedup branch:

                                                                                         
  777 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:32 -0500
      revision-id: john@arbash-meinel.com-20050627032031-e82a50db3863b18e
      bzr selftest was not using the correct bzr

  776 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:22 -0500
      revision-id: john@arbash-meinel.com-20050627032021-c9f21fde989ddaee
      Add was using an old mutter

  775 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:02:33 -0500
      revision-id: john@arbash-meinel.com-20050627030233-9165cfe98fc63298
      Cleaned up to be less different

  774 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:54:53 -0500
      revision-id: john@arbash-meinel.com-20050627025452-4260d0e744edef43
      Allow BZR_PLUGIN_PATH='' to negate plugin loading.

  773 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:49:34 -0500
      revision-id: john@arbash-meinel.com-20050627024933-b7158f67b7b9eae5
      Finished the previous cleanup (allowing load_plugins to be called twice)

  772 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:45:08 -0500
      revision-id: john@arbash-meinel.com-20050627024508-723b1df510d196fc
      Work on making the tests pass. versioning.py is calling run_cmd directly, but plugins have been loaded.

  771 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:32:29 -0500
      revision-id: john@arbash-meinel.com-20050627023228-79972744d7c53e15
      Got it down a little bit more by removing import of tree and inventory.

  770 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:26:05 -0500
      revision-id: john@arbash-meinel.com-20050627022604-350b9773ef622f95
      Reducing the number of import from bzrlib/__init__.py and bzrlib/branch.py

  769 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:32:25 -0500
      revision-id: john@arbash-meinel.com-20050627013225-32dd044f10d23948
      Updated revision.py and xml.py to include SubElement.

  768 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:56 -0500
      revision-id: john@arbash-meinel.com-20050627010356-ee66919e1c377faf
      Minor typo

  767 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:13 -0500
      revision-id: john@arbash-meinel.com-20050627010312-40d024007eb85051
      Caching the import

  766 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:51:47 -0500
      revision-id: john@arbash-meinel.com-20050627005147-5281c99e48ed1834
      Created wrapper functions for lazy import of ElementTree

  765 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:46:37 -0500
      revision-id: john@arbash-meinel.com-20050627004636-bf432902004a94c5
      Removed all of the test imports of cElementTree

  764 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:43:59 -0500
      revision-id: john@arbash-meinel.com-20050627004358-d137fbe9570dd71b
      Trying to make bzr startup faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Killing versions
 
2
****************
 
3
 
 
4
Sometimes people really need to rewrite history.  The canonical
 
5
example is that they have accidentally checked confidential
 
6
information into the wrong tree.
 
7
 
 
8
There is a tension between two imperatives:
 
9
 
 
10
* Accurately record all history.
 
11
 
 
12
* Remove critical information.
 
13
 
 
14
Of course we cannot control who may have made use of the information
 
15
in the time it was public, but often these things are caught early enough.
 
16
 
 
17
After history has been rewritten, anything that depends on that
 
18
history may be inconsistent.  We cannot consistently continue on a
 
19
version that has had some revisions knocked out; therefore it seems
 
20
simplest to kill the version over all.  
 
21
 
 
22
You can make a tag onto a new version from a previous consistent
 
23
revision.  
 
24
 
 
25
Downstream users will need to switch on to the new version.
 
26
 
 
27
We can mark the version as killed so that mirroring will delete the
 
28
revisions and clients looking at the version can suggest switching.
 
29
 
 
30
This should be an extremely infrequent operation so it is OK that it
 
31
is simple as long as it fulfils the basic requirement.
 
32
 
 
33
A related problem is that people sometimes commit the wrong log
 
34
message, or (more seriously) the wrong files.  It is common to notice
 
35
immediately afterwards.
 
36
 
 
37
 
 
38
Uncommit
 
39
--------
 
40
 
 
41
I think this is the best and most useful option at the moment: the
 
42
`uncommit command`_ undoes the last commit, and nothing else.  It can
 
43
be repeated to successively remove more and more history.
 
44
 
 
45
.. _`uncommit command`: cmdref.html#uncommit
 
46
 
 
47
Example::
 
48
 
 
49
    % cd my-project
 
50
    % bzr add launch-codes.txt
 
51
    % bzr commit -m 'add launch codes'
 
52
    A     launch-codes.txt
 
53
    recorded r23
 
54
    [oops!]
 
55
    % bzr uncommit
 
56
    [now back to just before the commit command]
 
57
    
 
58
    % bzr status
 
59
    A     launch-codes.txt
 
60
    % bzr revert launch-codes.txt
 
61
    % bzr status
 
62
    ?     launch-codes.txt
 
63
 
 
64
If anyone else has depended on the option then the branches will have
 
65
diverged and that needs to be resolved somehow, probably by the other
 
66
people starting a new branch with the correct commit.  In particular
 
67
uncommitting from a shared branch will break anyone who has seen that
 
68
revision; possibly there needs to be a policy option on such branches
 
69
to deny uncommit.
 
70
 
 
71
If someone else on that shared branch did a the equivalent of a
 
72
switch_ command then they would bring their changes onto the correct
 
73
basis.  Would it be reasonable to do that automatically?
 
74
 
 
75
.. _switch: cmdref.html#switch
 
76
 
 
77
 
 
78
 
 
79
UI proposals
 
80
------------
 
81
 
 
82
Aaron's proposal::
 
83
 
 
84
    % cd my-project
 
85
    % baz add launch-codes.txt
 
86
    % baz commit -s 'add launch codes'
 
87
    recorded patch-4
 
88
    % baz add good-code.c
 
89
    % baz commit -s 'add good code'
 
90
    recorded patch-5
 
91
    [oops!]
 
92
    % baz undo patch-3
 
93
    % baz pull patch-5
 
94
    % baz commit --as-latest
 
95
    renamed old branch to my-project-old-1
 
96
    % baz eradicate my-project-old-1
 
97
 
 
98
Long form::
 
99
 
 
100
  % cd my-project
 
101
  % baz add launch-codes.txt
 
102
  % baz commit -s 'add launch codes'
 
103
  recorded patch-4
 
104
  % baz add good-code.c
 
105
  % baz commit -s 'add good code'
 
106
  recorded patch-5
 
107
  [oops!]
 
108
  % cd ../
 
109
  % baz fork my-project--patch3 my-project-fixed
 
110
  % cd my-project-fixed
 
111
  % baz pull ../my-project patch5
 
112
  % cd ../
 
113
  % rm -rf my-project
 
114
  % mv my-project-fixed my-project
 
115
 
 
116
Robert's proposal::
 
117
 
 
118
  % cd my-project
 
119
  % baz add launch-codes.txt
 
120
  % baz commit -s 'add launch codes'
 
121
  recorded patch-4
 
122
  % baz add good-code.c
 
123
  % baz commit -s 'add good code'
 
124
  recorded patch-5
 
125
  [oops!]
 
126
  % baz branch patch-3 $(baz tree-version)
 
127
  % baz pull . patch-5
 
128
  % baz eliminate patch-4