~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branchbuilder.py

  • Committer: Vincent Ladeuil
  • Date: 2009-07-10 07:43:15 UTC
  • mto: (4529.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4530.
  • Revision ID: v.ladeuil+lp@free.fr-20090710074315-tfbke0r54hk2af6o
Fix TZ-dependent tests.

* bzrlib/tests/test_annotate.py:
(TestAnnotate.create_merged_trees,
TestAnnotate.create_deeply_merged_trees): Isolate from timezone.

* bzrlib/branchbuilder.py:
(BranchBuilder.build_snapshot): timezone is useful to build
TZ-independent tests .

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
 
163
163
    def build_snapshot(self, revision_id, parent_ids, actions,
164
164
        message=None, timestamp=None, allow_leftmost_as_ghost=False,
165
 
        committer=None):
 
165
        committer=None, timezone=None):
166
166
        """Build a commit, shaped in a specific way.
167
167
 
168
168
        :param revision_id: The handle for the new commit, can be None
177
177
            commit message will be written.
178
178
        :param timestamp: If non-None, set the timestamp of the commit to this
179
179
            value.
 
180
        :param timezone: An optional timezone for timestamp.
180
181
        :param committer: An optional username to use for commit
181
182
        :param allow_leftmost_as_ghost: True if the leftmost parent should be
182
183
            permitted to be a ghost.
243
244
            for file_id, content in new_contents.iteritems():
244
245
                tree.put_file_bytes_non_atomic(file_id, content)
245
246
            return self._do_commit(tree, message=message, rev_id=revision_id,
246
 
                timestamp=timestamp, committer=committer)
 
247
                timestamp=timestamp, timezone=timezone, committer=committer)
247
248
        finally:
248
249
            tree.unlock()
249
250