Rfaulk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87043
Change subject: mod - dulwich staging, stage all files in git.
......................................................................
mod - dulwich staging, stage all files in git.
Change-Id: I713d1fe133c82ce6c22d67320a112fb2fd16eee8
---
M sartoris/sartoris.py
1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/43/87043/1
diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index 41534e9..069a1e1 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -218,12 +218,17 @@
except AttributeError:
raise SartorisError(message=exit_codes[7], exit_code=7)
- def _dulwich_stage(self, file):
+ def _dulwich_stage_all(self):
"""
Stage modified files in the repo
"""
_repo = Repo(self.config['top_dir'])
- _repo.stage([file])
+
+ # Iterate through files, those modified will be staged
+ for elem in os.walk(self.config['top_dir']):
+ if not search(r'\./\.git', elem[0]):
+ files = [elem[2] + '/' + file for file in elem[2]]
+ _repo.stage(files)
def _dulwich_commit(self, author, message=DEFAULT_COMMIT_MSG):
"""
@@ -461,7 +466,7 @@
self._dulwich_reset_to_tag(tag)
# Add changes to staging
- self._dulwich_stage('*')
+ self._dulwich_stage_all()
# Commit
self._dulwich_commit(self._make_author())
--
To view, visit https://gerrit.wikimedia.org/r/87043
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I713d1fe133c82ce6c22d67320a112fb2fd16eee8
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