preilly has submitted this change and it was merged.
Change subject: add. force action in args.
......................................................................
add. force action in args.
Change-Id: I85b83d0d146e7db7545b4cd021c7b930ece4e9e1
---
M sartoris/sartoris.py
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Rfaulk: Verified; Looks good to me, approved
preilly: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index af5e910..110cc09 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -28,7 +28,7 @@
import subprocess
from dulwich.config import StackedConfig
from dulwich.repo import Repo
-from dulwich.objects import Blob, Tree, Commit, parse_timezone, Tag
+from dulwich.objects import Blob, Tree, Commit, parse_timezone
from datetime import datetime
import json
from time import time
@@ -120,6 +120,9 @@
parser.add_argument("-v", "--verbose",
default=defaults["verbose"], action="count",
help="increase the logging verbosity")
+ parser.add_argument("-f", "--force",
+ action="store_true",
+ help="force the action, bypass sanity checks.")
args = parser.parse_args()
return args
@@ -352,7 +355,7 @@
_tag = "{0}-sync-{1}".format(repo_name,
datetime.now().strftime(
self.DATE_TIME_TAG_FORMAT))
- proc = subprocess.Popen(['/usr/bin/git', 'tag', '-a', _tag,
+ proc = subprocess.Popen(['/usr/bin/git', 'tag', '-a', _tag,
'-m', '"test sync"'])
proc.communicate()
@@ -369,7 +372,7 @@
exit_code = 32
log.error("{0}::{1}".format(__name__, exit_codes[exit_code]))
return exit_code
- return self._sync(_tag, None)
+ return self._sync(_tag, args.force)
def _sync(self, tag, force):
repo_name = self.config['repo_name']
--
To view, visit https://gerrit.wikimedia.org/r/64033
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85b83d0d146e7db7545b4cd021c7b930ece4e9e1
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <[email protected]>
Gerrit-Reviewer: Rfaulk <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-Reviewer: preilly <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits