/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/developers/revert.txt

  • Committer: Robert Collins
  • Date: 2009-08-26 03:20:32 UTC
  • mfrom: (4637 +trunk)
  • mto: (4634.6.2 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: robertc@robertcollins.net-20090826032032-mx5kiog3eihaoy13
Merge and cherrypick outstanding 2.0 relevant patches from bzr.dev: Up to rev
4637, then 4639,4641,4643,4646,4649,4650,4651. (Robert Collins)

Log messages of the incorporated fixes:

revno: 4651 [merge]
  (robertc) Enable commit via record_iter_changes for specific file
        comments. (Robert Collins)

revno: 4650 [merge]
  Fix shelve on windows. (Robert Collins, #305006)

revno: 4649 [merge]
  (robertc) Make iter_changes produce output that is always safe to
        generate inventory deltas of in the same direction as the
        changes. (Robert Collins, #347649)

revno: 4646 [merge]
  (mbp) developer documentation about content filtering

revno: 4643 [merge]
  (mbp) small tweaks to release documentation

revno: 4641 [merge]
  (abentley) Shelve will not remove tree root.

revno: 4639 [merge]
  (andrew) Fix 'Revision ... not present' errors when upgrading stacked
        branches.

revno: 4637 [merge]
  Fix upgrade of branches in repositories.

revno: 4636 [merge]
  (mbp) fix crash formatting CannotBindAddress

revno: 4635 [merge]
  (robertc) Fix many locking errors on windows due to a small bug in
        merge.transform_tree. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Revert
 
2
======
 
3
 
 
4
Change users selected paths to be the same as those in a given revision making
 
5
backups of any paths that bzr did not set the last contents itself.
 
6
 
 
7
Least work we can hope to perform
 
8
---------------------------------
 
9
 
 
10
We should be able to do work proportional to the scope the user is reverting
 
11
and the amount of changes between the working tree and the revision being
 
12
reverted to.
 
13
 
 
14
This depends on being able to compare unchanged subtrees without recursing so that the mapping of paths to revert to ids to revert can be done efficiently. Specifically we should be able to avoid getting the transitive closure of directory contents when mapping back to paths from ids at the start of revert.
 
15
 
 
16
One way this might work is to:
 
17
for the selected scopes, for each element in the wt:
 
18
 
 
19
 1. get hash tree data for that scope.
 
20
 1. get 'new enough' hash data for the siblings of the scope: it can be out of date as long as its not older than the last move or rename out of that siblings scope.
 
21
 1. Use the hash tree data to tune the work done in finding matching paths/ids which are different in the two trees.
 
22
 
 
23
For each thing that needs to change - group by target directory?
 
24
 
 
25
 1. Extract new content.
 
26
 1. Backup old content or replace-in-place (except windows where we move and replace).