Skip to content

Commit c70a5cb

Browse files
authored
Rename client_opts var to client_options (#184)
1 parent 05efb63 commit c70a5cb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ configuration:
1919
type: array
2020
parallel:
2121
type: string
22-
client_opts:
22+
client_options:
2323
type: string
2424
backup_changelists:
2525
type: bool

python/buildkite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_config():
5050
conf['stream'] = os.environ.get('BUILDKITE_PLUGIN_PERFORCE_STREAM')
5151
conf['sync'] = list_from_env_array('BUILDKITE_PLUGIN_PERFORCE_SYNC')
5252
conf['parallel'] = os.environ.get('BUILDKITE_PLUGIN_PERFORCE_PARALLEL') or 0
53-
conf['client_opts'] = os.environ.get('BUILDKITE_PLUGIN_PERFORCE_CLIENT_OPTIONS')
53+
conf['client_options'] = os.environ.get('BUILDKITE_PLUGIN_PERFORCE_CLIENT_OPTIONS')
5454

5555
if 'BUILDKITE_PLUGIN_PERFORCE_ROOT' in os.environ and not __LOCAL_RUN__:
5656
raise Exception("Custom P4 root is for use in unit tests only")

python/perforce.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616
class P4Repo:
1717
"""A class for manipulating perforce workspaces"""
1818
def __init__(self, root=None, view=None, stream=None,
19-
sync=None, client_opts=None, parallel=0):
19+
sync=None, client_options=None, parallel=0):
2020
"""
2121
root: Directory in which to create the client workspace
2222
view: Client workspace mapping
2323
stream: Client workspace stream. Overrides view parameter.
2424
sync: List of paths to sync. Defaults to entire view.
25-
client_opts: Additional options to add to client. (e.g. allwrite)
25+
client_options: Additional options to add to client. (e.g. allwrite)
2626
parallel: How many threads to use for parallel sync.
2727
"""
2828
self.root = os.path.abspath(root or '')
2929
self.stream = stream
3030
self.view = self._localize_view(view or [])
3131
self.sync_paths = sync or ['//...']
3232
assert isinstance(self.sync_paths, list)
33-
self.client_opts = client_opts or ''
33+
self.client_options = client_options or ''
3434
self.parallel = parallel
3535

3636
self.created_client = False
@@ -93,7 +93,7 @@ def _setup_client(self):
9393

9494
# unless overidden, overwrite writeable-but-unopened files
9595
# (e.g. interrupted syncs, artefacts that have been checked-in)
96-
client._options = self.client_opts + ' clobber'
96+
client._options = self.client_options + ' clobber'
9797

9898
self.perforce.save_client(client)
9999

0 commit comments

Comments
 (0)