/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 bzrlib/revision.py

  • Committer: John Arbash Meinel
  • Date: 2010-01-12 20:51:58 UTC
  • mto: (4634.119.5 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: john@arbash-meinel.com-20100112205158-ka4r62tpmtf3aglg
Fix a bug in the dirstate logic for 'set_path_id'.

It was a bit tricky to sort out, because it depends on the sort order
of sets. Basically 'set_path_id' was accidentally adding the old
file-id a a location to get the entry for the new file-id.
And then the _get_entry lookup would see that the entry was
absent in the given tree (because it doesn't validate that the
file-id for the entry line actually matches the file-id supplied).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
28
28
    symbol_versioning,
29
29
    )
30
30
from bzrlib.osutils import contains_whitespace
 
31
from bzrlib.progress import DummyProgress
31
32
 
32
33
NULL_REVISION="null:"
33
34
CURRENT_REVISION="current:"
53
54
 
54
55
    def __init__(self, revision_id, properties=None, **args):
55
56
        self.revision_id = revision_id
56
 
        if properties is None:
57
 
            self.properties = {}
58
 
        else:
59
 
            self.properties = properties
60
 
            self._check_properties()
 
57
        self.properties = properties or {}
 
58
        self._check_properties()
61
59
        self.committer = None
62
60
        self.parent_ids = []
63
61
        self.parent_sha1s = []