vlad-hg 2.1.1 → 2.1.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/History.txt +8 -0
- data/README.txt +8 -0
- data/Rakefile +3 -0
- data/lib/vlad/mercurial.rb +3 -3
- data/lib/vlad/mercurial_queue.rb +2 -2
- data/test/test_vlad_mercurial.rb +2 -2
- data/test/test_vlad_mercurial_queue.rb +5 -5
- metadata +4 -4
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 2.1.2 / 2010-09-15
|
2
|
+
|
3
|
+
* 1 bug fix
|
4
|
+
|
5
|
+
* If +revision+ isn't specified, use 'default' instead of 'tip'. This fixes
|
6
|
+
what would be unexpected behavior from a repository whose tip isn't on the
|
7
|
+
default branch.
|
8
|
+
|
1
9
|
=== 2.1.1 / 2010-06-15
|
2
10
|
|
3
11
|
* 1 minor enhancement
|
data/README.txt
CHANGED
@@ -39,6 +39,14 @@ Mercurial support for Vlad. Using it is as simple as passing
|
|
39
39
|
|
40
40
|
* sudo gem install vlad-hg
|
41
41
|
|
42
|
+
== VARIABLES:
|
43
|
+
|
44
|
+
hg_cmd:: The mercurial command to use. Defaults to 'hg'.
|
45
|
+
queue_repo:: The location of the MQ repository to use for
|
46
|
+
+:mercurial_queue+. Defaults to "#{repository}/.hg/patches".
|
47
|
+
queue_revision:: The revision of the _patch queue_ repository to use. See
|
48
|
+
below.
|
49
|
+
|
42
50
|
== PATCH QUEUES:
|
43
51
|
|
44
52
|
+vlad-hg+ supports deploying from a patch queue repository on top of the main
|
data/Rakefile
CHANGED
@@ -3,10 +3,13 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'hoe'
|
5
5
|
|
6
|
+
Hoe.plugin :hg
|
7
|
+
|
6
8
|
Hoe.spec 'vlad-hg' do
|
7
9
|
self.rubyforge_name = 'hitsquad'
|
8
10
|
developer 'Kevin R. Bullock', 'kbullock@ringworld.org'
|
9
11
|
extra_deps << ['vlad', '~> 2.0']
|
12
|
+
self.hg_release_tag_prefix = 'rel-'
|
10
13
|
end
|
11
14
|
|
12
15
|
# vim: syntax=Ruby
|
data/lib/vlad/mercurial.rb
CHANGED
@@ -3,7 +3,7 @@ require 'vlad'
|
|
3
3
|
module Vlad
|
4
4
|
class Mercurial
|
5
5
|
|
6
|
-
VERSION = '2.1.
|
6
|
+
VERSION = '2.1.2'.freeze
|
7
7
|
|
8
8
|
set :source, Vlad::Mercurial.new
|
9
9
|
set :hg_cmd, "hg"
|
@@ -14,7 +14,7 @@ module Vlad
|
|
14
14
|
# changeset ID or equivalent (e.g. branch, tag, etc...)
|
15
15
|
|
16
16
|
def checkout(revision, destination)
|
17
|
-
revision = '
|
17
|
+
revision = 'default' if revision =~ /^head$/i
|
18
18
|
|
19
19
|
# These all get executed after a "cd #{scm_path}"
|
20
20
|
[ "if [ ! -d .hg ]; then #{hg_cmd} init; fi",
|
@@ -29,7 +29,7 @@ module Vlad
|
|
29
29
|
# Expects to be run from +scm_path+ after Vlad::Mercurial#checkout
|
30
30
|
|
31
31
|
def export(revision, destination)
|
32
|
-
revision = '
|
32
|
+
revision = 'default' if revision =~ /^head$/i
|
33
33
|
|
34
34
|
"#{hg_cmd} archive -r #{revision} #{destination}"
|
35
35
|
end
|
data/lib/vlad/mercurial_queue.rb
CHANGED
@@ -16,7 +16,7 @@ module Vlad
|
|
16
16
|
# changeset ID or equivalent (e.g. branch, tag, etc...)
|
17
17
|
|
18
18
|
def checkout(revision, destination)
|
19
|
-
revision = '
|
19
|
+
revision = 'default' if revision =~ /^head$/i
|
20
20
|
|
21
21
|
commands = []
|
22
22
|
commands << "if [ ! -d .hg ]; then #{hg_cmd} init; fi"
|
@@ -36,7 +36,7 @@ module Vlad
|
|
36
36
|
# Expects to be run from +scm_path+ after Vlad::Mercurial#checkout
|
37
37
|
|
38
38
|
def export(revision, destination)
|
39
|
-
revision = '
|
39
|
+
revision = 'default' if revision =~ /^head$/i
|
40
40
|
|
41
41
|
"#{hg_cmd} archive -r qtip #{destination}"
|
42
42
|
end
|
data/test/test_vlad_mercurial.rb
CHANGED
@@ -14,14 +14,14 @@ class TestVladMercurial < MiniTest::Unit::TestCase
|
|
14
14
|
|
15
15
|
expected = "if [ ! -d .hg ]; then hg init; fi " \
|
16
16
|
"&& hg pull http://repo/project " \
|
17
|
-
"&& hg update
|
17
|
+
"&& hg update default"
|
18
18
|
|
19
19
|
assert_equal expected, cmd
|
20
20
|
end
|
21
21
|
|
22
22
|
def test_export
|
23
23
|
cmd = @scm.export 'head', '/path/to/release'
|
24
|
-
assert_equal 'hg archive -r
|
24
|
+
assert_equal 'hg archive -r default /path/to/release', cmd
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_revision
|
@@ -20,7 +20,7 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
20
20
|
"&& hg qpop -a " \
|
21
21
|
"&& hg pull http://repo/project " \
|
22
22
|
"&& hg pull -R .hg/patches http://repo/project/.hg/patches " \
|
23
|
-
"&& hg update
|
23
|
+
"&& hg update default " \
|
24
24
|
"&& hg update -R .hg/patches tip " \
|
25
25
|
"&& hg qpush -a"
|
26
26
|
|
@@ -33,8 +33,8 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_revision
|
36
|
-
cmd = @scm.revision('
|
37
|
-
expected = "`hg identify -r
|
36
|
+
cmd = @scm.revision('default')
|
37
|
+
expected = "`hg identify -r default | cut -f1 -d\\ `"
|
38
38
|
assert_equal expected, cmd
|
39
39
|
end
|
40
40
|
|
@@ -49,7 +49,7 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
49
49
|
"&& hg qpop -a " \
|
50
50
|
"&& hg pull http://repo/project " \
|
51
51
|
"&& hg pull -R .hg/patches http://repo/project-patched " \
|
52
|
-
"&& hg update
|
52
|
+
"&& hg update default " \
|
53
53
|
"&& hg update -R .hg/patches tip " \
|
54
54
|
"&& hg qpush -a"
|
55
55
|
|
@@ -67,7 +67,7 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
67
67
|
"&& hg qpop -a " \
|
68
68
|
"&& hg pull http://repo/project " \
|
69
69
|
"&& hg pull -R .hg/patches http://repo/project/.hg/patches " \
|
70
|
-
"&& hg update
|
70
|
+
"&& hg update default " \
|
71
71
|
"&& hg update -R .hg/patches deadbeefd00d " \
|
72
72
|
"&& hg qpush -a"
|
73
73
|
|
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:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 2
|
10
|
+
version: 2.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kevin R. Bullock
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-15 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|