aboutsummaryrefslogtreecommitdiff
path: root/b4/__init__.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-07-20 10:26:55 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-07-20 10:26:55 -0400
commitf0fad6ec193c39626e90d01dcbb6541c66b9fdef (patch)
tree5c256a0b04128d0ddd3d15bf2607ce39b709e5a1 /b4/__init__.py
parent45aaaf33f00e3d05456394775802d7551b20757c (diff)
downloadb4-f0fad6ec193c39626e90d01dcbb6541c66b9fdef.tar.gz
ez: refactor based on initial feedback
Significant refactor of (formerly) "b4 submit" based on initial feedback: 1. Split "b4 submit" into three different commands: - ez-series: for managing the series cover letters, tracking info, etc - ez-trailers: for retrieving trailers and updating commits (works on any branch, not just ez-series branches) - ez-send: for sending branches managed by ez-series 2. Refactor to support multiple cover letter strategies: - the default "commit" strategy that keeps the cover letter in an empty commit (should be backwards-compatible with "b4 submit") - the non-invasive "branch-description" strategy that keeps the cover letter in the branch.branchname.description configuration setting and tracking in branch.branchname.b4-tracking - the not-yet-implemented "tag" strategy that mimics the behaviour of git-publish The strategy can be set via b4.ez-cover-strategy variable, e.g. in your .gitconfig: [b4] ez-cover-strategy = branch-description Note, that converting from one strategy to another doesn't work and will probably explode in weird ways right now. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r--b4/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index b3aa84f..6adabbd 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2008,6 +2008,12 @@ def in_directory(dirname):
os.chdir(cdir)
+def git_set_config(fullpath: Optional[str], param: str, value: str, operation: str = '--replace-all'):
+ args = ['config', operation, param, value]
+ ecode, out = git_run_command(fullpath, args)
+ return ecode
+
+
def get_config_from_git(regexp: str, defaults: Optional[dict] = None, multivals: Optional[list] = None) -> dict:
if multivals is None:
multivals = list()