git-process-lib 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +8 -2
- data/bin/git-sync +4 -4
- data/lib/git-process/changed_file_helper.rb +2 -5
- data/lib/git-process/git_lib.rb +14 -2
- data/lib/git-process/sync_process.rb +1 -1
- data/lib/git-process/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
-
# CHANGELOG -
|
1
|
+
# CHANGELOG - 2.0.2 #
|
2
2
|
|
3
3
|
### Since 2.0.1 ###
|
4
4
|
|
5
|
-
|
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", :
|
18
|
-
parser.opt :merge, "Merge instead of rebase against the integration branch", :short => :
|
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
|
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
|
data/lib/git-process/git_lib.rb
CHANGED
@@ -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.
|
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
|
-
|
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
|
|
data/lib/git-process/version.rb
CHANGED
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:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
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-
|
18
|
+
date: 2013-09-17 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|