vlad-hg 2.1.3 → 2.2.1

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/.gemtest ADDED
File without changes
data/History.txt CHANGED
@@ -1,3 +1,22 @@
1
+ === 2.2.1 / 2011-07-18
2
+
3
+ * 1 bug fix
4
+
5
+ * Fix regressions caused by failure to merge 2.1.3 before releasing 2.2.0.
6
+
7
+ === 2.2.0 / 2011-07-18
8
+
9
+ * 1 minor enhancement
10
+
11
+ * Added +hg_subrepos+ variable. When set to +true+, the export step recurses
12
+ into subdirectories (adds the -S flag to <code>hg archive</code>).
13
+
14
+ * 1 bug fix
15
+
16
+ * Now does a proper <code>hg clone</code>, so that the default path on the
17
+ deployment clone is set to the central repository. This is necessary if your
18
+ repo has subrepos with relative paths.
19
+
1
20
  === 2.1.3 / 2010-11-22
2
21
 
3
22
  * 2 bugfixes
data/README.txt CHANGED
@@ -42,6 +42,8 @@ Mercurial support for Vlad. Using it is as simple as passing
42
42
  == VARIABLES:
43
43
 
44
44
  hg_cmd:: The mercurial command to use. Defaults to 'hg'.
45
+ hg_subrepos:: Whether to look for subrepos when exporting. Defaults to
46
+ false.
45
47
  queue_repo:: The location of the MQ repository to use for
46
48
  +:mercurial_queue+. Defaults to "#{repository}/.hg/patches".
47
49
  queue_revision:: The revision of the _patch queue_ repository to use. See
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ Hoe.spec 'vlad-hg' do
9
9
  self.rubyforge_name = 'hitsquad'
10
10
  developer 'Kevin R. Bullock', 'kbullock@ringworld.org'
11
11
  extra_deps << ['vlad', '~> 2.0']
12
- self.hg_release_tag_prefix = 'rel-'
12
+ self.hg_release_tag_prefix = 'v'
13
13
  end
14
14
 
15
15
  # vim: syntax=Ruby
@@ -3,11 +3,12 @@ require 'vlad'
3
3
  module Vlad
4
4
  class Mercurial
5
5
 
6
- VERSION = '2.1.3'.freeze
6
+ VERSION = '2.2.1'.freeze
7
7
 
8
- set :source, Vlad::Mercurial.new
9
- set :hg_cmd, 'hg'
10
- set :revision, 'default'
8
+ set :source, Vlad::Mercurial.new
9
+ set :hg_cmd, 'hg'
10
+ set :revision, 'default'
11
+ set :hg_subrepos, false
11
12
 
12
13
  ##
13
14
  # Returns the command that will check out +revision+ from the
@@ -16,7 +17,7 @@ module Vlad
16
17
 
17
18
  def checkout(revision, destination)
18
19
  # These all get executed after a "cd #{scm_path}"
19
- [ "if [ ! -d .hg ]; then #{hg_cmd} init; fi",
20
+ [ "if [ ! -d .hg ]; then #{hg_cmd} clone -r null #{repository} .; fi",
20
21
  "#{hg_cmd} pull #{repository}",
21
22
  "#{hg_cmd} update #{revision}"
22
23
  ].join(' && ')
@@ -32,7 +33,7 @@ module Vlad
32
33
  when :checkout, :clone
33
34
  "#{hg_cmd} clone #{scm_path} -r #{revision} #{destination}"
34
35
  else # :archive, :export (or whatever)
35
- "#{hg_cmd} archive -r #{revision} #{destination}"
36
+ "#{hg_cmd} archive#{' -S' if hg_subrepos} -r #{revision} #{destination}"
36
37
  end
37
38
  end
38
39
 
@@ -13,9 +13,10 @@ class TestVladMercurial < Rake::TestCase
13
13
  def test_checkout
14
14
  cmd = @scm.checkout 'default', '/path/to/scm'
15
15
 
16
- expected = "if [ ! -d .hg ]; then hg init; fi " \
17
- "&& hg pull http://repo/project " \
18
- "&& hg update default"
16
+ expected =
17
+ "if [ ! -d .hg ]; then hg clone -r null http://repo/project .; fi " \
18
+ "&& hg pull http://repo/project " \
19
+ "&& hg update default"
19
20
 
20
21
  assert_equal expected, cmd
21
22
  end
@@ -26,6 +27,12 @@ class TestVladMercurial < Rake::TestCase
26
27
  assert_equal 'hg archive -r default /path/to/release', cmd
27
28
  end
28
29
 
30
+ def test_export_subrepos
31
+ set :hg_subrepos, true
32
+ cmd = @scm.export 'default', '/path/to/release'
33
+ assert_equal 'hg archive -S -r default /path/to/release', cmd
34
+ end
35
+
29
36
  def test_revision
30
37
  # 0x0000_0000_0000 is the changeset ID for the root revision of all hg repos
31
38
  cmd = @scm.revision('000000000000')
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vlad-hg
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease: false
4
+ hash: 5
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
+ - 2
8
9
  - 1
9
- - 3
10
- version: 2.1.3
10
+ version: 2.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin R. Bullock
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-22 00:00:00 -06:00
19
- default_executable:
18
+ date: 2011-07-18 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: vlad
@@ -34,37 +33,21 @@ dependencies:
34
33
  type: :runtime
35
34
  version_requirements: *id001
36
35
  - !ruby/object:Gem::Dependency
37
- name: rubyforge
36
+ name: hoe
38
37
  prerelease: false
39
38
  requirement: &id002 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ">="
43
42
  - !ruby/object:Gem::Version
44
- hash: 7
43
+ hash: 35
45
44
  segments:
46
45
  - 2
47
- - 0
46
+ - 9
48
47
  - 4
49
- version: 2.0.4
48
+ version: 2.9.4
50
49
  type: :development
51
50
  version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: hoe
54
- prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 21
61
- segments:
62
- - 2
63
- - 6
64
- - 1
65
- version: 2.6.1
66
- type: :development
67
- version_requirements: *id003
68
51
  description: |-
69
52
  Mercurial support for Vlad. Using it is as simple as passing
70
53
  <tt>:scm => :mercurial</tt> to Vlad when loading it up.
@@ -87,7 +70,7 @@ files:
87
70
  - lib/vlad/mercurial_queue.rb
88
71
  - test/test_vlad_mercurial.rb
89
72
  - test/test_vlad_mercurial_queue.rb
90
- has_rdoc: true
73
+ - .gemtest
91
74
  homepage: http://hitsquad.rubyforge.org/vlad-hg/
92
75
  licenses: []
93
76
 
@@ -118,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
101
  requirements: []
119
102
 
120
103
  rubyforge_project: hitsquad
121
- rubygems_version: 1.3.7
104
+ rubygems_version: 1.8.5
122
105
  signing_key:
123
106
  specification_version: 3
124
107
  summary: Mercurial support for Vlad