| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import collections | 5 import collections |
| 6 | 6 |
| 7 from infra.services.gnumbd import inner_loop as gnumbd | 7 from infra.services.gnumbd import gnumbd |
| 8 content_of = gnumbd.content_of | 8 content_of = gnumbd.content_of |
| 9 | 9 |
| 10 REAL = 'refs/heads/master' | 10 REAL = 'refs/heads/master' |
| 11 PEND = 'refs/pending/heads/master' | 11 PEND = 'refs/pending/heads/master' |
| 12 PEND_TAG = 'refs/pending-tags/heads/master' | 12 PEND_TAG = 'refs/pending-tags/heads/master' |
| 13 | 13 |
| 14 BRANCH = 'refs/branch-heads/cool_branch' | 14 BRANCH = 'refs/branch-heads/cool_branch' |
| 15 BRANCH_PEND = 'refs/pending/branch-heads/cool_branch' | 15 BRANCH_PEND = 'refs/pending/branch-heads/cool_branch' |
| 16 BRANCH_TAG = 'refs/pending-tags/branch-heads/cool_branch' | 16 BRANCH_TAG = 'refs/pending-tags/branch-heads/cool_branch' |
| 17 | 17 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 CHECKPOINT('%r has a timestamp behind %r' % ( | 498 CHECKPOINT('%r has a timestamp behind %r' % ( |
| 499 user_commit.hsh, base_commit.hsh), include_committer=True) | 499 user_commit.hsh, base_commit.hsh), include_committer=True) |
| 500 RUN() | 500 RUN() |
| 501 CHECKPOINT('Presto! Timestamp is fixed', include_committer=True) | 501 CHECKPOINT('Presto! Timestamp is fixed', include_committer=True) |
| 502 assert content_of(origin[REAL].commit) == content_of(user_commit) | 502 assert content_of(origin[REAL].commit) == content_of(user_commit) |
| 503 assert origin[REAL].commit.parent == base_commit | 503 assert origin[REAL].commit.parent == base_commit |
| 504 assert ( | 504 assert ( |
| 505 origin[REAL].commit.data.committer.timestamp.secs > | 505 origin[REAL].commit.data.committer.timestamp.secs > |
| 506 origin[REAL].commit.parent.data.committer.timestamp.secs | 506 origin[REAL].commit.parent.data.committer.timestamp.secs |
| 507 ) | 507 ) |
| OLD | NEW |