Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: testing_support/git/repo.py

Issue 415033003: A few additional fixes for infra refactoring in testing_support (Closed) Base URL: https://chromium.googlesource.com/infra/testing/testing_support.git@master
Patch Set: Fix imports and setup.py Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « testing_support/git/__init__.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 atexit 5 import atexit
6 import collections 6 import collections
7 import datetime 7 import datetime
8 import os 8 import os
9 import shutil 9 import shutil
10 import subprocess 10 import subprocess
(...skipping 22 matching lines...) Expand all
33 * AUTHOR_NAME 33 * AUTHOR_NAME
34 * AUTHOR_EMAIL 34 * AUTHOR_EMAIL
35 * AUTHOR_DATE - must be a datetime.datetime instance 35 * AUTHOR_DATE - must be a datetime.datetime instance
36 * COMMITTER_NAME 36 * COMMITTER_NAME
37 * COMMITTER_EMAIL 37 * COMMITTER_EMAIL
38 * COMMITTER_DATE - must be a datetime.datetime instance 38 * COMMITTER_DATE - must be a datetime.datetime instance
39 39
40 For file content, if 'data' is None, then this commit will `git rm` that file. 40 For file content, if 'data' is None, then this commit will `git rm` that file.
41 """ 41 """
42 BASE_TEMP_DIR = tempfile.mkdtemp(suffix='base', prefix='git_repo') 42 BASE_TEMP_DIR = tempfile.mkdtemp(suffix='base', prefix='git_repo')
43 atexit.register(shutil.rmtree, BASE_TEMP_DIR)
44 43
45 # Singleton objects to specify specific data in a commit dictionary. 44 # Singleton objects to specify specific data in a commit dictionary.
46 AUTHOR_NAME = object() 45 AUTHOR_NAME = object()
47 AUTHOR_EMAIL = object() 46 AUTHOR_EMAIL = object()
48 AUTHOR_DATE = object() 47 AUTHOR_DATE = object()
49 COMMITTER_NAME = object() 48 COMMITTER_NAME = object()
50 COMMITTER_EMAIL = object() 49 COMMITTER_EMAIL = object()
51 COMMITTER_DATE = object() 50 COMMITTER_DATE = object()
52 51
53 DEFAULT_AUTHOR_NAME = 'Author McAuthorly' 52 DEFAULT_AUTHOR_NAME = 'Author McAuthorly'
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 else: 229 else:
231 assert current is not None 230 assert current is not None
232 hash_to_msg[current] = line 231 hash_to_msg[current] = line
233 ret.add_partial(line) 232 ret.add_partial(line)
234 for parent in parents: 233 for parent in parents:
235 ret.add_partial(line, hash_to_msg[parent]) 234 ret.add_partial(line, hash_to_msg[parent])
236 current = None 235 current = None
237 parents = [] 236 parents = []
238 assert current is None 237 assert current is None
239 return ret 238 return ret
OLDNEW
« no previous file with comments | « testing_support/git/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698