git-process-lib 2.0.1 → 2.0.2

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.
data/CHANGELOG.md CHANGED
@@ -1,8 +1,14 @@
1
- # CHANGELOG - 1.2.0 #
1
+ # CHANGELOG - 2.0.2 #
2
2
 
3
3
  ### Since 2.0.1 ###
4
4
 
5
- Changed git-pull-request to git-pull-req
5
+ * Added "extra safe" code for deleting on Windows ([GH-121](https://github.com/jdigger/git-process/issues/121))
6
+ * Unknown variable for handling uncommited changes for sync ([GH-123](https://github.com/jdigger/git-process/issues/123))
7
+ * git-sync -r now keeps rebase on instead of acting as a switch ([GH-122](https://github.com/jdigger/git-process/issues/122))
8
+
9
+ ### Since 2.0.0 ###
10
+
11
+ * Changed git-pull-request to git-pull-req
6
12
 
7
13
  ### Since 1.1.4 ###
8
14
 
data/bin/git-sync CHANGED
@@ -14,10 +14,10 @@ class SyncOptions
14
14
 
15
15
 
16
16
  def extend_opts(parser)
17
- parser.opt :rebase, "Rebase instead of merge against the integration branch", :default => true
18
- parser.opt :merge, "Merge instead of rebase against the integration branch", :short => :none, :default => false
17
+ parser.opt :rebase, "Rebase instead of merge against the integration branch (default: on)", :short => :r
18
+ parser.opt :merge, "Merge instead of rebase against the integration branch", :short => :m
19
19
  parser.opt :force, "Force the push; defaults to true if --rebase is used", :short => :f, :default => false
20
- parser.opt :local, "Do not do a push; gets remote changes, but does not update the server", :short => :l, :default => false
20
+ parser.opt :local, "Do not do a push; gets remote changes, but does not update the server", :short => :l
21
21
 
22
22
  parser.conflicts :rebase, :merge
23
23
  parser.conflicts :local, :force
@@ -26,8 +26,8 @@ class SyncOptions
26
26
 
27
27
  #noinspection RubyUnusedLocalVariable
28
28
  def post_parse(opts, argv)
29
+ opts[:rebase] = true unless opts[:merge]
29
30
  opts[:force] = true if opts[:rebase]
30
- opts[:merge] = !opts[:rebase]
31
31
 
32
32
  opts[:branch_name] = argv.shift
33
33
  end
@@ -22,6 +22,8 @@ module GitProc
22
22
  #noinspection RubyControlFlowConversionInspection,RubyClassMethodNamingConvention,RubyInstanceMethodNamingConvention
23
23
  class ChangeFileHelper
24
24
 
25
+ attr_reader :gitlib
26
+
25
27
  # @param [GitLib] gitlib
26
28
  def initialize(gitlib)
27
29
  @gitlib = gitlib
@@ -105,11 +107,6 @@ module GitProc
105
107
  resp == 'c' ? :commit : :stash
106
108
  end
107
109
 
108
-
109
- def gitlib
110
- @gitlib
111
- end
112
-
113
110
  end
114
111
 
115
112
  end
@@ -523,7 +523,9 @@ module GitProc
523
523
  def read_sync_control_file(branch_name)
524
524
  filename = sync_control_filename(branch_name)
525
525
  if File.exists?(filename)
526
- sha = File.new(filename).readline.chop
526
+ sha = File.open(filename) do |file|
527
+ file.readline.chop
528
+ end
527
529
  logger.debug "Read sync control file, #{filename}: #{sha}"
528
530
  sha
529
531
  else
@@ -536,7 +538,17 @@ module GitProc
536
538
  def delete_sync_control_file!(branch_name)
537
539
  filename = sync_control_filename(branch_name)
538
540
  logger.debug { "Deleting sync control file, #{filename}" }
539
- File.delete(filename)
541
+
542
+ counter = 10
543
+ while counter > 0
544
+ begin
545
+ File.delete(filename)
546
+ counter = 0
547
+ rescue
548
+ counter = counter - 1
549
+ sleep(0.25)
550
+ end
551
+ end
540
552
  end
541
553
 
542
554
 
@@ -34,7 +34,7 @@ module GitProc
34
34
  super
35
35
 
36
36
  if not gitlib.status.clean?
37
- change_file_helper.offer_to_help_uncommitted_changes
37
+ GitProc::ChangeFileHelper.new(gitlib).offer_to_help_uncommitted_changes
38
38
  end
39
39
 
40
40
  raise ParkedChangesError.new(self) if gitlib.is_parked?
@@ -14,7 +14,7 @@ module GitProc
14
14
  module Version
15
15
  MAJOR = 2
16
16
  MINOR = 0
17
- PATCH = 1
17
+ PATCH = 2
18
18
  BUILD = nil
19
19
 
20
20
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-process-lib
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 1
10
- version: 2.0.1
9
+ - 2
10
+ version: 2.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jim Moore
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-09-11 00:00:00 -06:00
18
+ date: 2013-09-17 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency