Rfaulk has submitted this change and it was merged.

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
M scripts/make-release.py
2 files changed, 9 insertions(+), 4 deletions(-)

Approvals:
  Rfaulk: Verified; Looks good to me, approved
  jenkins-bot: Verified



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())
diff --git a/scripts/make-release.py b/scripts/make-release.py
index 3db9df3..5ac7522 100644
--- a/scripts/make-release.py
+++ b/scripts/make-release.py
@@ -27,7 +27,7 @@
                 continue
             length = len(match.group(1))
             version = match.group(1).strip()
-            if lineiter.next().count('-') != len(match.group(0)):
+            if lineiter.next().count('-') != length:
                 continue
             while 1:
                 change_info = lineiter.next().strip()

-- 
To view, visit https://gerrit.wikimedia.org/r/87043
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I713d1fe133c82ce6c22d67320a112fb2fd16eee8
Gerrit-PatchSet: 2
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <[email protected]>
Gerrit-Reviewer: Rfaulk <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to