gitcycle 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/gitcycle.gemspec +1 -1
  2. data/lib/gitcycle.rb +16 -4
  3. metadata +3 -3
data/gitcycle.gemspec CHANGED
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "gitcycle"
9
- s.version = '0.2.9'
9
+ s.version = '0.2.10'
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.authors = [ 'Winton Welsh' ]
12
12
  s.email = [ 'mail@wintoni.us' ]
data/lib/gitcycle.rb CHANGED
@@ -243,12 +243,22 @@ class Gitcycle
243
243
  :branch => branch['name']
244
244
  )
245
245
  elsif branch
246
- # Merge from upstream owner
246
+ # Merge from upstream source branch
247
247
  merge_remote_branch(
248
248
  :owner => branch['repo']['owner'],
249
249
  :repo => branch['repo']['name'],
250
250
  :branch => branch['source']
251
251
  )
252
+ else
253
+ puts "\nRetrieving repo information from gitcycle.\n".green
254
+ repo = get('repo')
255
+
256
+ # Merge from upstream branch with same name
257
+ merge_remote_branch(
258
+ :owner => repo['owner'],
259
+ :repo => repo['name'],
260
+ :branch => current_branch
261
+ )
252
262
  end
253
263
 
254
264
  unless collab
@@ -733,10 +743,12 @@ class Gitcycle
733
743
 
734
744
  add_remote_and_fetch(options)
735
745
 
736
- puts "\nMerging remote branch '#{branch}' from '#{owner}/#{repo}'.\n".green
737
- run("git merge #{owner}/#{branch}")
746
+ if branches(:remote => true, :match => "#{owner}/#{branch}")
747
+ puts "\nMerging remote branch '#{branch}' from '#{owner}/#{repo}'.\n".green
748
+ run("git merge #{owner}/#{branch}")
738
749
 
739
- fix_conflict(options)
750
+ fix_conflict(options)
751
+ end
740
752
  end
741
753
 
742
754
  def options?(args)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitcycle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 9
10
- version: 0.2.9
9
+ - 10
10
+ version: 0.2.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Winton Welsh