Merge ~smoser/usd-importer:no-more-run into usd-importer:master

Proposed by Scott Moser on 2016-11-01
Status: Merged
Approved by: Nish Aravamudan on 2016-11-01
Approved revision: 512d992daabb0d10291b31d1b5e0ca570a256f24
Merged at revision: 71cf0e2654ea761559193ea2abac27ef8e9e0638
Proposed branch: ~smoser/usd-importer:no-more-run
Merge into: usd-importer:master
Diff against target: 70 lines (+8/-30)
1 file modified
usd/GitRepository.py (+8/-30)
Reviewer Review Type Date Requested Status
Nish Aravamudan 2016-11-01 Approve on 2016-11-01
Review via email: mp+309777@code.launchpad.net
To post a comment you must log in.
Nish Aravamudan (nacc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/usd/GitRepository.py b/usd/GitRepository.py
2index e80750a..0b71229 100644
3--- a/usd/GitRepository.py
4+++ b/usd/GitRepository.py
5@@ -652,14 +652,9 @@ class USDGitRepository:
6 self.clean_repository_state()
7
8 # relies on this API being present, handle error if not?
9- cp = subprocess.run(
10- ['git', 'dsc-commit', '--tree-only', srcpkg.dsc_pathname],
11- stdout=subprocess.PIPE,
12- stderr=subprocess.DEVNULL,
13- universal_newlines=True,
14- check=True,
15- env=self._env)
16- import_tree_hash = cp.stdout.strip()
17+ cp = run(['git', 'dsc-commit', '--tree-only', srcpkg.dsc_pathname],
18+ env=self._env)
19+ import_tree_hash = cp.stdout.decode().strip()
20 logging.info('Imported version %s as tree %s',
21 spi.version, import_tree_hash
22 )
23@@ -860,18 +855,11 @@ class USDGitRepository:
24 )
25 sys.exit(1)
26 else:
27+ upload_parent_commit = str(upload_tag.peel().id)
28 if publish_parent_commit is not None:
29 try:
30- subprocess.run(
31- ['git', 'merge-base', '--is-ancestor',
32- publish_parent_commit,
33- str(upload_tag.peel().id)
34- ],
35- stdout=subprocess.PIPE,
36- stderr=subprocess.DEVNULL,
37- universal_newlines=True,
38- check=True,
39- env=self._env)
40+ run(['git', 'merge-base', '--is-ancestor',
41+ publish_parent_commit, upload_parent_commit])
42 publish_parent_commit = None
43 except subprocess.CalledProcessError as e:
44 if e.returncode != 1:
45@@ -879,23 +867,13 @@ class USDGitRepository:
46
47 if changelog_parent_commit is not None:
48 try:
49- subprocess.run(
50- ['git', 'merge-base', '--is-ancestor',
51- changelog_parent_commit,
52- str(upload_tag.peel().id)
53- ],
54- stdout=subprocess.PIPE,
55- stderr=subprocess.DEVNULL,
56- universal_newlines=True,
57- check=True,
58- env=self._env)
59+ run(['git', 'merge-base', '--is-ancestor',
60+ changelog_parent_commit, upload_parent_commit])
61 changelog_parent_commit = None
62 except subprocess.CalledProcessError as e:
63 if e.returncode != 1:
64 raise
65
66- upload_parent_commit = str(upload_tag.peel().id)
67-
68 self.commit_import(
69 spi,
70 import_tree_hash,

Subscribers

People subscribed via source and target branches