git-maintain 0.14.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14413a6c304673d11dd57a4b5ecec51e2717aff5e77b2b6c7caade9d89a29ed4
4
- data.tar.gz: 0e74198aea4155a40790169c51123293aa0811ae41b5f0d17e0a8b81f72bbf1b
3
+ metadata.gz: f55e7403a58f8a095f7d56a209d420a39bd9e80764aba046a3c5abe01a36e895
4
+ data.tar.gz: 470418a1906e8e3e75f9f7c0d76ed966f4db5b3484dd4fbcc260373ab5fd5c78
5
5
  SHA512:
6
- metadata.gz: c8ba35679ef2ea3676be16e59db74bbc3266eed55f4ab73f9d28d923f11d67c058833a3eeb984252d5d089b28485d9a44536729f8db68918c371fe6581bf1667
7
- data.tar.gz: ee69deed0ff1ceb20900d252cd74948921847a488aedd01226001be2a82dc3cf248662a4310fe5ca30188d7fb98ed83d108ca37cb6e1e4c26aec7d53cf458daf
6
+ metadata.gz: f809fb74f7373c31e2cabf787c5aa3ef5e7664cb147662e4fba1bc114f1ef3f96924b0276a52c6a941876093acd590ae42ccb4634d9c23aa88525075a921f450
7
+ data.tar.gz: 33da4f97cf225aaeed97e09f354f87b3345c492fce43708526f09b4d29254d8eac5f43cac685a52920b2b03cfa19d7284ec6c26dacb7838734982d92ce993fd3
data/CHANGELOG CHANGED
@@ -1,3 +1,16 @@
1
+ ------------------
2
+ 1.1.0 (2026-09-18)
3
+ ------------------
4
+
5
+ * Update to cli_class_tool 2.0.0
6
+ * Use new runXXX API
7
+
8
+ ------------------
9
+ 1.0.0 (2026-09-09)
10
+ ------------------
11
+
12
+ * Update to cli_class_tool 1.0.0
13
+
1
14
  ------------------
2
15
  0.14.2 (2026-09-09)
3
16
  ------------------
@@ -588,7 +588,7 @@ module GitMaintain
588
588
  delete_list = opts[:delete_branches] || []
589
589
  return if delete_list.length == 0
590
590
  puts "Deleting #{opts[:delete_remote] == true ? "remote" : "local"} branches: #{delete_list.join(" ")}"
591
- rep = confirm(opts, "continue", true)
591
+ rep = confirm(opts, "continue", ignored_default: true)
592
592
  if rep != "y" then
593
593
  log(:INFO, "Cancelling")
594
594
  return
@@ -713,7 +713,7 @@ module GitMaintain
713
713
  # @raise [CherryPickErrorException] If cherry-picking the commit (and its alternatives) fails
714
714
  def pick_one(commit)
715
715
  cpCmd="cherry-pick --strategy=recursive -Xpatience -x"
716
- runGitInteractive("#{cpCmd} #{commit} &> /dev/null", {}, false)
716
+ runGitInteractive("#{cpCmd} #{commit} &> /dev/null", catch_err: true)
717
717
  return if $? == 0
718
718
 
719
719
  if runGit("status -uno --porcelain | wc -l") == "0" then
@@ -725,7 +725,7 @@ module GitMaintain
725
725
  # That didn't work? Let's try that with every variation of the commit
726
726
  # in other stable trees.
727
727
  @repo.find_alts(commit).each(){|alt_commit|
728
- runGitInteractive("#{cpCmd} #{alt_commit} &> /dev/null", {}, false)
728
+ runGitInteractive("#{cpCmd} #{alt_commit} &> /dev/null", catch_err: true)
729
729
  if $? == 0 then
730
730
  return
731
731
  end
@@ -734,7 +734,7 @@ module GitMaintain
734
734
 
735
735
  # Still no? Let's go back to the original commit and hand it off to
736
736
  # the user.
737
- runGitInteractive("#{cpCmd} #{commit} &> /dev/null", {}, false)
737
+ runGitInteractive("#{cpCmd} #{commit} &> /dev/null", catch_err: true)
738
738
  raise CherryPickErrorException.new("Failed to cherry pick commit #{commit}", commit)
739
739
  end
740
740
 
@@ -747,8 +747,11 @@ module GitMaintain
747
747
  def cp_fix(opts, commit)
748
748
  runGitInteractive("diff")
749
749
  log( :INFO, "Entering subshell to fix conflicts. Exit when done")
750
- runSystem("PS1_WARNING='CP FIX' bash", false)
751
- rep = confirm(opts, "continue with scp [y(es), n(o), s(kip)]?", true, ["y", "n", "s"])
750
+ runSystem("PS1_WARNING='CP FIX' bash", catch_err: true)
751
+ rep = confirm(opts, "continue with scp",
752
+ ignore_default: true,
753
+ allowed_reps: ["y", "n", "s"],
754
+ usage: "[y]es, [n]o, [s]kip")
752
755
  case rep
753
756
  when "n"
754
757
  runGitInteractive("cherry-pick --abort")
@@ -807,8 +810,10 @@ module GitMaintain
807
810
  commit_desc = @repo.getCommitHeadline(commit)
808
811
  rep = "t"
809
812
  while rep != "y"
810
- rep = confirm(opts, "pick commit '#{commit_desc}' up ([y]es, [n]o, [b]lacklist)",
811
- false, ["y", "n", "?", "b"])
813
+ rep = confirm(opts, "pick commit '#{commit_desc}' up",
814
+ ignore_default: false,
815
+ allowed_reps: ["y", "n", "?", "b"],
816
+ usage: " ([y]es, [n]o, show[?], [b]lacklist")
812
817
 
813
818
  case rep
814
819
  when "y"
@@ -820,7 +825,7 @@ module GitMaintain
820
825
  add_blacklist(commit)
821
826
  raise CPSkip.new(commit)
822
827
  when "?"
823
- runGitInteractive("show #{commit}", {}, false)
828
+ runGitInteractive("show #{commit}", catch_err: true)
824
829
  end
825
830
  end
826
831
 
@@ -152,7 +152,7 @@ module GitMaintain
152
152
  # @return [String] Cached or fetched config value string
153
153
  # @raise [RunError] If running git config fails unexpectedly
154
154
  def getGitConfig(entry)
155
- return @config_cache[entry] ||= runGit("config #{entry} 2> /dev/null", {}, false).chomp()
155
+ return @config_cache[entry] ||= runGit("config #{entry}", catch_err: true, silent_err: true).chomp()
156
156
  end
157
157
 
158
158
  # Spawn an interactive subshell (bash), wrapping error conditions into a GitMaintainError.
@@ -416,7 +416,8 @@ module GitMaintain
416
416
  end
417
417
 
418
418
  log(:WARNING, "This will officially release these tags: #{new_tags.join(", ")}")
419
- rep = confirm(opts, "release them", true)
419
+ rep = confirm(opts, "release them",
420
+ ignore_default: true)
420
421
  if rep != 'y' then
421
422
  raise GitMaintainError.new("Aborting..")
422
423
  end
@@ -426,7 +427,8 @@ module GitMaintain
426
427
  end
427
428
 
428
429
  log(:WARNING, "Last chance to cancel before submitting")
429
- rep= confirm(opts, "submit these releases", true)
430
+ rep= confirm(opts, "submit these releases",
431
+ ignore_default: true)
430
432
  if rep != 'y' then
431
433
  raise GitMaintainError.new("Aborting..")
432
434
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Morey-Chaisemartin
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-09 00:00:00.000000000 Z
10
+ date: 2026-09-18 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: cli_class_tool
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 4.0.16
85
+ rubygems_version: 4.0.20
86
86
  specification_version: 4
87
87
  summary: Your ultimate script for maintaining stable branches and releasing your project.
88
88
  test_files: []