pull: Add --force flag that permeates down to checkout

This commit is contained in:
Mr. Outis
2018-11-18 09:27:42 -06:00
parent 2906a31b66
commit f26c1fffef
3 changed files with 10 additions and 3 deletions
+5
View File
@@ -325,6 +325,11 @@ def parse_args(argv=None):
default=False,
help='Fetch cache for all dependencies of the '
'specified target.')
pull_parser.add_argument(
'-f',
'--force',
help='Do not prompt when removing '
'working directory files.')
pull_parser.set_defaults(func=CmdDataPull)
# Push
+2 -1
View File
@@ -25,7 +25,8 @@ class CmdDataPull(CmdDataBase):
show_checksums=self.args.show_checksums,
all_branches=self.args.all_branches,
all_tags=self.args.all_tags,
with_deps=self.args.with_deps)
with_deps=self.args.with_deps,
force=self.args.force)
except Exception as exc:
self.project.logger.error('Failed to pull data from the cloud',
exc)
+3 -2
View File
@@ -762,7 +762,8 @@ class Project(object):
all_branches=False,
show_checksums=False,
with_deps=False,
all_tags=False):
all_tags=False,
force=False):
self.fetch(target,
jobs,
remote=remote,
@@ -770,7 +771,7 @@ class Project(object):
all_tags=all_tags,
show_checksums=show_checksums,
with_deps=with_deps)
self.checkout(target=target, with_deps=with_deps)
self.checkout(target=target, with_deps=with_deps, force=force)
def _local_status(self, target=None):
status = {}