vlad-hg 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -3,7 +3,7 @@ require 'vlad'
3
3
  module Vlad
4
4
  class Mercurial
5
5
 
6
- VERSION = '2.1.1'.freeze
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 = 'tip' if revision =~ /^head$/i
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 = 'tip' if revision =~ /^head$/i
32
+ revision = 'default' if revision =~ /^head$/i
33
33
 
34
34
  "#{hg_cmd} archive -r #{revision} #{destination}"
35
35
  end
@@ -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 = 'tip' if revision =~ /^head$/i
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 = 'tip' if revision =~ /^head$/i
39
+ revision = 'default' if revision =~ /^head$/i
40
40
 
41
41
  "#{hg_cmd} archive -r qtip #{destination}"
42
42
  end
@@ -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 tip"
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 tip /path/to/release', cmd
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 tip " \
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('tip')
37
- expected = "`hg identify -r tip | cut -f1 -d\\ `"
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 tip " \
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 tip " \
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: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 1
10
- version: 2.1.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-06-23 00:00:00 -05:00
18
+ date: 2010-09-15 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency