hglib 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +35 -3
- data/History.md +7 -0
- data/lib/hglib.rb +20 -1
- data/spec/.status +37 -34
- data/spec/hglib_spec.rb +29 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6d1d2540e89d71dd245cd203f0bfac51901c85ecc2e15ad9813566780accb85
|
4
|
+
data.tar.gz: 921a4beab0aea45f0762a54e010e25d2385534dc10b909a8f0b3d651c1b12e25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0642c4fa43ba0f1dba6962e12ef566c3123079c78db53d3d9ffb4a73e1d9a9504a7f66b3966a622ba205fbb22f41ffbcd25df81044e48f0bf4a8f3b6624f8ec9
|
7
|
+
data.tar.gz: b9838d26c1c4bc7820554463737eb9d3d57f09c934ff0865f21e92597cba2650e4ae791caadad5011e3d6437f7b79074618dc4986469770a401fc98abd512b16
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,12 +1,44 @@
|
|
1
|
+
2019-06-26 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
@ * .hgtags:
|
4
|
+
| Added tag v0.2.0 for changeset f6b0928a58c6
|
5
|
+
| [26735e788a0d] [tip]
|
6
|
+
|
|
7
|
+
o * .hgsigs:
|
8
|
+
| Added signature for changeset e05206de50ed
|
9
|
+
| [f6b0928a58c6] [v0.2.0]
|
10
|
+
|
|
11
|
+
o * History.md, lib/hglib.rb:
|
12
|
+
| Bump minor version, update history
|
13
|
+
| [e05206de50ed]
|
14
|
+
|
|
15
|
+
o * .hgtags:
|
16
|
+
| Added tag v0.1.0 for changeset e4dc675f47f3
|
17
|
+
| [0a80612185f0]
|
18
|
+
|
|
19
|
+
o * .hgsigs:
|
20
|
+
| Added signature for changeset e4dc675f47f3
|
21
|
+
| [c19d67daf0cb]
|
22
|
+
|
|
1
23
|
2019-04-03 Michael Granger <ged@FaerieMUD.org>
|
2
24
|
|
3
|
-
|
25
|
+
o * Rakefile:
|
4
26
|
| Make the project public
|
5
|
-
| [
|
27
|
+
| [8c56f3131fb7]
|
28
|
+
|
|
29
|
+
2019-05-14 Michael Granger <ged@FaerieMUD.org>
|
30
|
+
|
31
|
+
o * hglib.gemspec, lib/hglib.rb, spec/hglib_spec.rb:
|
32
|
+
| Added is_repo? and init methods to Hglib
|
6
33
|
|
|
34
|
+
| Also improved test coverage of top-level module.
|
35
|
+
| [938b0de05aed]
|
36
|
+
|
|
37
|
+
2019-04-03 Michael Granger <ged@FaerieMUD.org>
|
38
|
+
|
7
39
|
o * History.md, lib/hglib.rb:
|
8
40
|
| Bump the minor version and update history.
|
9
|
-
| [e4dc675f47f3]
|
41
|
+
| [e4dc675f47f3] [v0.1.0]
|
10
42
|
|
|
11
43
|
o * lib/hglib/repo/log_entry.rb, spec/hglib/repo/log_entry_spec.rb:
|
12
44
|
| Add a #files attribute to log entries.
|
data/History.md
CHANGED
data/lib/hglib.rb
CHANGED
@@ -12,7 +12,7 @@ module Hglib
|
|
12
12
|
Exception2MessageMapper
|
13
13
|
|
14
14
|
# Package version
|
15
|
-
VERSION = '0.
|
15
|
+
VERSION = '0.2.0'
|
16
16
|
|
17
17
|
# Version control revision
|
18
18
|
REVISION = %q$Revision$
|
@@ -60,6 +60,15 @@ module Hglib
|
|
60
60
|
end
|
61
61
|
|
62
62
|
|
63
|
+
### Returns +true+ if the specified +dir+ looks like it is a Mercurial
|
64
|
+
### repository.
|
65
|
+
def self::is_repo?( dir )
|
66
|
+
dir = Pathname( dir )
|
67
|
+
hgdir = dir + '.hg'
|
68
|
+
return dir.directory? && hgdir.directory?
|
69
|
+
end
|
70
|
+
|
71
|
+
|
63
72
|
### Return an Hglib::Repo object for the specified +path+.
|
64
73
|
def self::repo( path='.' )
|
65
74
|
return Hglib::Repo.new( path )
|
@@ -77,5 +86,15 @@ module Hglib
|
|
77
86
|
return self.repo( local_dir )
|
78
87
|
end
|
79
88
|
|
89
|
+
|
90
|
+
### Initialize a repository in the given +dir+ and return a Hglib::Repo
|
91
|
+
### for it.
|
92
|
+
def self::init( dir, **options )
|
93
|
+
output = self.server( nil ).run( :init, dir, **options )
|
94
|
+
self.log.debug "Init output: %s" % [ output ]
|
95
|
+
|
96
|
+
return self.repo( dir )
|
97
|
+
end
|
98
|
+
|
80
99
|
end # module Hglib
|
81
100
|
|
data/spec/.status
CHANGED
@@ -1,39 +1,42 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
---------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/hglib/repo/id_spec.rb[1:1] | passed | 0.
|
4
|
-
./spec/hglib/repo/id_spec.rb[1:2] | passed | 0.
|
5
|
-
./spec/hglib/repo/id_spec.rb[1:3] | passed | 0.
|
6
|
-
./spec/hglib/repo/id_spec.rb[1:4] | passed | 0.
|
7
|
-
./spec/hglib/repo/id_spec.rb[1:5] | passed | 0.
|
8
|
-
./spec/hglib/repo/id_spec.rb[1:6] | passed | 0.
|
9
|
-
./spec/hglib/repo/id_spec.rb[1:7:1] | passed | 0.
|
10
|
-
./spec/hglib/repo/id_spec.rb[1:7:2] | passed | 0.
|
3
|
+
./spec/hglib/repo/id_spec.rb[1:1] | passed | 0.0001 seconds |
|
4
|
+
./spec/hglib/repo/id_spec.rb[1:2] | passed | 0.00057 seconds |
|
5
|
+
./spec/hglib/repo/id_spec.rb[1:3] | passed | 0.00007 seconds |
|
6
|
+
./spec/hglib/repo/id_spec.rb[1:4] | passed | 0.00006 seconds |
|
7
|
+
./spec/hglib/repo/id_spec.rb[1:5] | passed | 0.00005 seconds |
|
8
|
+
./spec/hglib/repo/id_spec.rb[1:6] | passed | 0.00006 seconds |
|
9
|
+
./spec/hglib/repo/id_spec.rb[1:7:1] | passed | 0.00006 seconds |
|
10
|
+
./spec/hglib/repo/id_spec.rb[1:7:2] | passed | 0.00005 seconds |
|
11
11
|
./spec/hglib/repo/id_spec.rb[1:8:1] | passed | 0.00009 seconds |
|
12
|
-
./spec/hglib/repo/id_spec.rb[1:8:2] | passed | 0.
|
13
|
-
./spec/hglib/repo/id_spec.rb[1:8:3] | passed | 0.
|
14
|
-
./spec/hglib/repo/id_spec.rb[1:8:4] | passed | 0.
|
15
|
-
./spec/hglib/repo/id_spec.rb[1:8:5] | passed | 0.
|
16
|
-
./spec/hglib/repo/id_spec.rb[1:8:6] | passed | 0.
|
12
|
+
./spec/hglib/repo/id_spec.rb[1:8:2] | passed | 0.0001 seconds |
|
13
|
+
./spec/hglib/repo/id_spec.rb[1:8:3] | passed | 0.00251 seconds |
|
14
|
+
./spec/hglib/repo/id_spec.rb[1:8:4] | passed | 0.00007 seconds |
|
15
|
+
./spec/hglib/repo/id_spec.rb[1:8:5] | passed | 0.00006 seconds |
|
16
|
+
./spec/hglib/repo/id_spec.rb[1:8:6] | passed | 0.0001 seconds |
|
17
17
|
./spec/hglib/repo/id_spec.rb[1:9:1] | passed | 0.00005 seconds |
|
18
|
-
./spec/hglib/repo/id_spec.rb[1:9:2] | passed | 0.
|
19
|
-
./spec/hglib/repo/id_spec.rb[1:9:3] | passed | 0.
|
18
|
+
./spec/hglib/repo/id_spec.rb[1:9:2] | passed | 0.00005 seconds |
|
19
|
+
./spec/hglib/repo/id_spec.rb[1:9:3] | passed | 0.0001 seconds |
|
20
20
|
./spec/hglib/repo/id_spec.rb[1:9:4] | passed | 0.00004 seconds |
|
21
|
-
./spec/hglib/repo/log_entry_spec.rb[1:1] | passed | 0.
|
22
|
-
./spec/hglib/repo/log_entry_spec.rb[1:2] | passed | 0.
|
23
|
-
./spec/hglib/repo_spec.rb[1:1] | passed | 0.
|
24
|
-
./spec/hglib/repo_spec.rb[1:2] | passed | 0.
|
25
|
-
./spec/hglib/repo_spec.rb[1:3] | passed | 0.
|
26
|
-
./spec/hglib/server_spec.rb[1:1:1] | passed | 0.
|
27
|
-
./spec/hglib/server_spec.rb[1:1:2] | passed | 0.
|
28
|
-
./spec/hglib/server_spec.rb[1:1:3] | passed | 0.
|
29
|
-
./spec/hglib/server_spec.rb[1:1:4] | passed | 0.
|
30
|
-
./spec/hglib/server_spec.rb[1:1:5] | passed | 0.
|
31
|
-
./spec/hglib/server_spec.rb[1:1:6] | passed | 0.
|
32
|
-
./spec/hglib/server_spec.rb[1:2] | passed | 0.
|
33
|
-
./spec/hglib/server_spec.rb[1:3] | passed | 0.
|
34
|
-
./spec/hglib/server_spec.rb[1:4] | passed | 0.
|
35
|
-
./spec/hglib/server_spec.rb[1:5] | passed | 0.
|
36
|
-
./spec/hglib/server_spec.rb[1:6] | passed | 0.
|
37
|
-
./spec/hglib_spec.rb[1:1:1] | passed | 0.
|
38
|
-
./spec/hglib_spec.rb[1:1:2] | passed | 0.
|
39
|
-
./spec/hglib_spec.rb[1:2:1] | passed | 0.
|
21
|
+
./spec/hglib/repo/log_entry_spec.rb[1:1] | passed | 0.00151 seconds |
|
22
|
+
./spec/hglib/repo/log_entry_spec.rb[1:2] | passed | 0.00013 seconds |
|
23
|
+
./spec/hglib/repo_spec.rb[1:1] | passed | 0.0102 seconds |
|
24
|
+
./spec/hglib/repo_spec.rb[1:2] | passed | 0.00178 seconds |
|
25
|
+
./spec/hglib/repo_spec.rb[1:3] | passed | 0.00111 seconds |
|
26
|
+
./spec/hglib/server_spec.rb[1:1:1] | passed | 0.00041 seconds |
|
27
|
+
./spec/hglib/server_spec.rb[1:1:2] | passed | 0.00041 seconds |
|
28
|
+
./spec/hglib/server_spec.rb[1:1:3] | passed | 0.00042 seconds |
|
29
|
+
./spec/hglib/server_spec.rb[1:1:4] | passed | 0.00044 seconds |
|
30
|
+
./spec/hglib/server_spec.rb[1:1:5] | passed | 0.00042 seconds |
|
31
|
+
./spec/hglib/server_spec.rb[1:1:6] | passed | 0.00041 seconds |
|
32
|
+
./spec/hglib/server_spec.rb[1:2] | passed | 0.00064 seconds |
|
33
|
+
./spec/hglib/server_spec.rb[1:3] | passed | 0.00066 seconds |
|
34
|
+
./spec/hglib/server_spec.rb[1:4] | passed | 0.00065 seconds |
|
35
|
+
./spec/hglib/server_spec.rb[1:5] | passed | 0.00069 seconds |
|
36
|
+
./spec/hglib/server_spec.rb[1:6] | passed | 0.00157 seconds |
|
37
|
+
./spec/hglib_spec.rb[1:1:1] | passed | 0.0007 seconds |
|
38
|
+
./spec/hglib_spec.rb[1:1:2] | passed | 0.00141 seconds |
|
39
|
+
./spec/hglib_spec.rb[1:2:1] | passed | 0.00064 seconds |
|
40
|
+
./spec/hglib_spec.rb[1:3:1] | passed | 0.00017 seconds |
|
41
|
+
./spec/hglib_spec.rb[1:3:2] | passed | 0.00022 seconds |
|
42
|
+
./spec/hglib_spec.rb[1:3:3] | passed | 0.17371 seconds |
|
data/spec/hglib_spec.rb
CHANGED
@@ -16,6 +16,11 @@ RSpec.describe Hglib do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
|
19
|
+
let( :repo_dir ) do
|
20
|
+
Dir.mktmpdir( ['hglib', 'repodir'] )
|
21
|
+
end
|
22
|
+
|
23
|
+
|
19
24
|
describe "binary path" do
|
20
25
|
|
21
26
|
it "has a default" do
|
@@ -43,5 +48,29 @@ RSpec.describe Hglib do
|
|
43
48
|
|
44
49
|
end
|
45
50
|
|
51
|
+
|
52
|
+
describe "repo" do
|
53
|
+
|
54
|
+
it "can create a repo object for the current working directory" do
|
55
|
+
result = described_class.repo
|
56
|
+
expect( result ).to be_a( Hglib::Repo )
|
57
|
+
expect( result.path ).to eq( Pathname('.') )
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
it "can create a repo object for a specified directory" do
|
62
|
+
result = described_class.repo( repo_dir )
|
63
|
+
expect( result ).to be_a( Hglib::Repo )
|
64
|
+
expect( result.path ).to eq( Pathname(repo_dir) )
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
it "knows a repo dir is a repo dir", :requires_binary do
|
69
|
+
repo = described_class.init( repo_dir )
|
70
|
+
expect( described_class.is_repo?(repo_dir) ).to be_truthy
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
46
75
|
end
|
47
76
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hglib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
v4qqqa27Bs468d6SoPxjSm8a2mM9HZ4OdWhq4tFsbTeXDVquCfi64OTEaTt2xQdR
|
35
35
|
JnC4lpJfCP6aCXa5h2XAQfPSH636cQap
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2019-
|
37
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: loggability
|
@@ -140,14 +140,14 @@ dependencies:
|
|
140
140
|
requirements:
|
141
141
|
- - "~>"
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: '3.
|
143
|
+
version: '3.18'
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
148
|
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: '3.
|
150
|
+
version: '3.18'
|
151
151
|
description: |-
|
152
152
|
This is a client library for the Mercurial distributed revision control tool
|
153
153
|
that uses the [Command Server][cmdserver] for efficiency.
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.0.
|
207
|
+
rubygems_version: 3.0.3
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: This is a client library for the Mercurial distributed revision control tool
|
metadata.gz.sig
CHANGED
Binary file
|