braid 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/braid/commands/update.rb +1 -0
- data/lib/braid/operations.rb +16 -5
- data/lib/braid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22c192bf298deec94e78ff118cbb19ab8fedc6e6
|
4
|
+
data.tar.gz: cf7ab24e69fb9c3272e9fde0d71a93db16f4f289
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a2aa594064557e3c0fb8d1ed7452f8607b98bb101fcf42a3b7265779ce0ea16168dbbeb69dcf74e5883a008d6c7ab4686015a28ecbebe236b95d592087d56ba
|
7
|
+
data.tar.gz: 5d1cb3f00d03531dc5c5ca7319aa733bc36e55e1bdab40c11d49f52f22c0a680a40a6792d438e10f53fa8fbc93faf20c54f1cb1ee69c7127ce328d0d52c70611
|
data/lib/braid/operations.rb
CHANGED
@@ -8,8 +8,11 @@ module Braid
|
|
8
8
|
|
9
9
|
module Operations
|
10
10
|
class ShellExecutionError < BraidError
|
11
|
-
|
11
|
+
attr_reader :err, :out
|
12
|
+
|
13
|
+
def initialize(err = nil, out = nil)
|
12
14
|
@err = err
|
15
|
+
@out = out
|
13
16
|
end
|
14
17
|
|
15
18
|
def message
|
@@ -38,6 +41,12 @@ module Braid
|
|
38
41
|
end
|
39
42
|
end
|
40
43
|
class MergeError < BraidError
|
44
|
+
attr_reader :conflicts_text
|
45
|
+
|
46
|
+
def initialize(conflicts_text)
|
47
|
+
@conflicts_text = conflicts_text
|
48
|
+
end
|
49
|
+
|
41
50
|
def message
|
42
51
|
'could not merge'
|
43
52
|
end
|
@@ -134,7 +143,7 @@ module Braid
|
|
134
143
|
|
135
144
|
def exec!(cmd)
|
136
145
|
status, out, err = exec(cmd)
|
137
|
-
raise ShellExecutionError,
|
146
|
+
raise ShellExecutionError.new(err, out) unless status == 0
|
138
147
|
[status, out, err]
|
139
148
|
end
|
140
149
|
|
@@ -242,7 +251,8 @@ module Braid
|
|
242
251
|
invoke(:merge, '-s subtree --no-commit --no-ff', opt)
|
243
252
|
true
|
244
253
|
rescue ShellExecutionError
|
245
|
-
|
254
|
+
# TODO: Figure out how to pass along conflict messages.
|
255
|
+
raise MergeError, ''
|
246
256
|
end
|
247
257
|
|
248
258
|
# Merge three trees (local_treeish should match the current state of the
|
@@ -256,8 +266,9 @@ module Braid
|
|
256
266
|
def merge_trees(base_treeish, local_treeish, remote_treeish)
|
257
267
|
invoke(:merge_recursive, base_treeish, "-- #{local_treeish} #{remote_treeish}")
|
258
268
|
true
|
259
|
-
rescue ShellExecutionError
|
260
|
-
|
269
|
+
rescue ShellExecutionError => error
|
270
|
+
# "CONFLICT" messages go to stdout.
|
271
|
+
raise MergeError, error.out
|
261
272
|
end
|
262
273
|
|
263
274
|
def read_ls_files(prefix)
|
data/lib/braid/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristi Balan
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-01-
|
13
|
+
date: 2017-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: main
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project: braid
|
144
|
-
rubygems_version: 2.
|
144
|
+
rubygems_version: 2.5.1
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: A simple tool for tracking vendor branches in git.
|