Rfaulk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/86808
Change subject: add - method _make_author for formatting commiter ID.
......................................................................
add - method _make_author for formatting commiter ID.
Change-Id: If38ae1897019cef2cb4215abee66826cf03fcdc8
---
M sartoris/sartoris.py
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/08/86808/1
diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index 0e22d58..41534e9 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -239,6 +239,10 @@
timestamp = datetime.now().strftime(self.DATE_TIME_TAG_FORMAT)
return '{0}-{1}'.format(self.config['user'], timestamp)
+ def _make_author(self):
+ return '{0} <{1}>'.format(self.config['user.name'],
+ self.config['user.email'])
+
def start(self, args):
"""
* write a lock file
@@ -321,10 +325,8 @@
# In absence of a sync script -- Tag the repo
log.debug(__name__ + ' :: Calling default sync.')
- _author = '{0} <{1}>'.format(self.config['user.name'],
- self.config['user.email'])
try:
- self._dulwich_tag(tag, _author)
+ self._dulwich_tag(tag, self._make_author())
except Exception as e:
log.error(str(e))
raise SartorisError(message=exit_codes[12], exit_code=12)
@@ -462,9 +464,7 @@
self._dulwich_stage('*')
# Commit
- author = '{0} <{1}>'.format(self.config['user.name'],
- self.config['user.email'])
- self._dulwich_commit(author)
+ self._dulwich_commit(self._make_author())
# Sync to reset HEAD
self._sync(revert_tag, args.force)
--
To view, visit https://gerrit.wikimedia.org/r/86808
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If38ae1897019cef2cb4215abee66826cf03fcdc8
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits