git-maintain 0.2.2.pre.21.g90651a9 → 0.2.2.pre.23.g68eca44

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/branch.rb +12 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7058d660ae87cfa19ce473636c026f6704274a1901d03bf0f895b9f663a70fc
4
- data.tar.gz: 68aea71dc58052c7111030e54142d08c98ef304cb0f689daaacd876d48565844
3
+ metadata.gz: 536dacddb0c0c8e90d2ecc7f763a53b947246bfdf2c6dcb0c6026136bbb285f3
4
+ data.tar.gz: d49e3c9303468ca21b81bac901053457371d77dd1c0acba1b163d93802f5adc8
5
5
  SHA512:
6
- metadata.gz: fa31f246e4e40d17f27f7f57ec7fe5a04d4602daeb6400c846429e458eabe4711b5eb149ab8bef43f40a185ba82df25fcfd45a118ffd533af36a42da99596af9
7
- data.tar.gz: fb212744276d980d9156c5cc795727ef658db798588412d6695d5f6e8bba93678bfbe34c6784c1476415f2f608b58cd4e32f5a5399e336639ca8d46902ce7b6e
6
+ metadata.gz: df8160998fa142327a26d38b1fd06abbd1bad431f48fa4b8c34a899c4c698a13bbbbfccc69b8dd318b0f05b9b2ca3e58153911d5e200e2eac7648541e05bfd62
7
+ data.tar.gz: 047d07ec14de3930091880cedbc626eb94de6e3502557a544d87a69685007a8c741877fa4ebffe5c079f9274528d13f2112a60c4936f7efc04c58267cca0f105
data/lib/branch.rb CHANGED
@@ -51,8 +51,11 @@ module GitMaintain
51
51
  |val| opts[:base_ver] = val}
52
52
  optsParser.on("-V", "--version [regexp]", Regexp, "Regexp to filter versions.") {
53
53
  |val| opts[:version] = val}
54
- optsParser.on("-B", "--manual-branch <branch name>", "Work on a specific (non-stable) branch.") {
55
- |val| opts[:manual_branch] = val}
54
+
55
+ if action != :merge
56
+ optsParser.on("-B", "--manual-branch <branch name>", "Work on a specific (non-stable) branch.") {
57
+ |val| opts[:manual_branch] = val}
58
+ end
56
59
  case action
57
60
  when :cp
58
61
  optsParser.banner += "-c <sha1> [-c <sha1> ...]"
@@ -109,7 +112,7 @@ module GitMaintain
109
112
  end
110
113
  branchList.each(){|branch|
111
114
  puts "###############################"
112
- puts "# Working on v#{branch.version}"
115
+ puts "# Working on #{branch.verbose_name}"
113
116
  puts "###############################"
114
117
 
115
118
  if NO_CHECKOUT_ACTIONS.index(action) == nil then
@@ -130,8 +133,12 @@ module GitMaintain
130
133
  if version =~ /^[0-9]+$/
131
134
  @local_branch = "dev/stable-v#{@version}/#{@branch_suff}"
132
135
  @remote_branch ="stable-v#{@version}"
136
+ @branch_type = :std
137
+ @verbose_name = "v"+version
133
138
  else
134
139
  @remote_branch = @local_branch = version
140
+ @branch_type = :user_specified
141
+ @verbose_name = version
135
142
  end
136
143
 
137
144
  @head = @repo.runGit("rev-parse #{@local_branch}")
@@ -140,10 +147,10 @@ module GitMaintain
140
147
  @stable_base = @repo.findStableBase(@local_branch)
141
148
 
142
149
  end
143
- attr_reader :version, :local_branch, :head, :remote_branch, :remote_ref, :stable_head
150
+ attr_reader :version, :local_branch, :head, :remote_branch, :remote_ref, :stable_head, :verbose_name
144
151
 
145
152
  def is_targetted?(opts)
146
- return true if @version !~ /^[0-9]+$/
153
+ return true if @branch_type == :user_specified
147
154
  if @version.to_i < opts[:base_ver] then
148
155
  return :too_old
149
156
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.pre.21.g90651a9
4
+ version: 0.2.2.pre.23.g68eca44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Morey-Chaisemartin