vlad-hg 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +12 -0
- data/lib/vlad/mercurial.rb +1 -1
- data/lib/vlad/mercurial_queue.rb +8 -9
- data/test/test_vlad_mercurial_queue.rb +24 -24
- metadata +5 -5
data/History.txt
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
=== 2.2.3 / 2011-09-29
|
2
|
+
|
3
|
+
* 2 bug fixes
|
4
|
+
|
5
|
+
* Use <code>hg qclone</code> when cloning a repository with a patch queue,
|
6
|
+
so that the default path on the deployment patch queue repo is set to the
|
7
|
+
central repository. This matches the bugfix made in 2.2.0.
|
8
|
+
|
9
|
+
* Set a default value for +hg_subrepos+ when using MQ. This prevents the
|
10
|
+
export step from blowing up with an "undefined local variable or method"
|
11
|
+
error.
|
12
|
+
|
1
13
|
=== 2.2.2 / 2011-07-18
|
2
14
|
|
3
15
|
* 1 bug fix
|
data/lib/vlad/mercurial.rb
CHANGED
data/lib/vlad/mercurial_queue.rb
CHANGED
@@ -3,13 +3,12 @@ require 'vlad'
|
|
3
3
|
module Vlad
|
4
4
|
class MercurialQueue
|
5
5
|
|
6
|
-
set :source,
|
7
|
-
set :hg_cmd,
|
8
|
-
set :revision,
|
9
|
-
set :
|
10
|
-
|
11
|
-
|
12
|
-
set :queue_revision, 'default'
|
6
|
+
set :source, Vlad::MercurialQueue.new
|
7
|
+
set :hg_cmd, 'hg'
|
8
|
+
set :revision, 'default'
|
9
|
+
set :hg_subrepos, false
|
10
|
+
set(:queue_repo) { "#{repository}/.hg/patches" }
|
11
|
+
set :queue_revision, 'default'
|
13
12
|
|
14
13
|
##
|
15
14
|
# Returns the command that will check out +revision+ from the
|
@@ -18,8 +17,8 @@ module Vlad
|
|
18
17
|
|
19
18
|
def checkout(revision, destination)
|
20
19
|
commands = []
|
21
|
-
commands <<
|
22
|
-
|
20
|
+
commands <<
|
21
|
+
"if [ ! -d .hg ]; then #{hg_cmd} qclone -r null #{repository} .; fi"
|
23
22
|
commands << "#{hg_cmd} qpop -a"
|
24
23
|
commands << "#{hg_cmd} pull #{repository}"
|
25
24
|
commands << "#{hg_cmd} pull -R .hg/patches #{queue_repo}"
|
@@ -16,14 +16,14 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
16
16
|
def test_checkout
|
17
17
|
cmd = @scm.checkout 'default', '/path/to/scm'
|
18
18
|
|
19
|
-
expected =
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
expected =
|
20
|
+
"if [ ! -d .hg ]; then hg qclone -r null http://repo/project .; fi " \
|
21
|
+
"&& hg qpop -a " \
|
22
|
+
"&& hg pull http://repo/project " \
|
23
|
+
"&& hg pull -R .hg/patches http://repo/project/.hg/patches " \
|
24
|
+
"&& hg update default " \
|
25
|
+
"&& hg update -R .hg/patches tip " \
|
26
|
+
"&& hg qpush -a"
|
27
27
|
|
28
28
|
assert_equal expected, cmd
|
29
29
|
end
|
@@ -58,14 +58,14 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
58
58
|
# only need to test #checkout
|
59
59
|
cmd = @scm.checkout 'default', '/path/to/scm'
|
60
60
|
|
61
|
-
expected =
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
61
|
+
expected =
|
62
|
+
"if [ ! -d .hg ]; then hg qclone -r null http://repo/project .; fi " \
|
63
|
+
"&& hg qpop -a " \
|
64
|
+
"&& hg pull http://repo/project " \
|
65
|
+
"&& hg pull -R .hg/patches http://repo/project-patched " \
|
66
|
+
"&& hg update default " \
|
67
|
+
"&& hg update -R .hg/patches tip " \
|
68
|
+
"&& hg qpush -a"
|
69
69
|
|
70
70
|
assert_equal expected, cmd
|
71
71
|
end
|
@@ -76,14 +76,14 @@ class TestVladMercurialQueue < MiniTest::Unit::TestCase
|
|
76
76
|
# only need to test #checkout
|
77
77
|
cmd = @scm.checkout 'default', '/path/to/scm'
|
78
78
|
|
79
|
-
expected =
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
79
|
+
expected =
|
80
|
+
"if [ ! -d .hg ]; then hg qclone -r null http://repo/project .; fi " \
|
81
|
+
"&& hg qpop -a " \
|
82
|
+
"&& hg pull http://repo/project " \
|
83
|
+
"&& hg pull -R .hg/patches http://repo/project/.hg/patches " \
|
84
|
+
"&& hg update default " \
|
85
|
+
"&& hg update -R .hg/patches deadbeefd00d " \
|
86
|
+
"&& hg qpush -a"
|
87
87
|
|
88
88
|
assert_equal expected, cmd
|
89
89
|
end
|
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: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
9
|
+
- 3
|
10
|
+
version: 2.2.3
|
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: 2011-
|
18
|
+
date: 2011-09-30 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: vlad
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements: []
|
102
102
|
|
103
103
|
rubyforge_project: hitsquad
|
104
|
-
rubygems_version: 1.8.
|
104
|
+
rubygems_version: 1.8.9
|
105
105
|
signing_key:
|
106
106
|
specification_version: 3
|
107
107
|
summary: Mercurial support for Vlad
|