piston 1.0.0 → 1.0.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/CHANGELOG CHANGED
@@ -1,4 +1,11 @@
1
1
  *SVN*
2
2
 
3
+ 2006-08-24 1.0.1
4
+ * Corrected minor bug where the core extensions were in core_ext/core_ext
5
+ instead of being in core_ext.
6
+ * Require the parent working copy path be at HEAD before importing / updating.
7
+ * Don't do unnecessary merges if the file had not changed prior to the update.
8
+ * During the update, if adding a folder, do an svn mkdir instead of a cp_r.
9
+
3
10
  2006-08-24 1.0.0
4
11
  * Initial version
File without changes
File without changes
@@ -14,6 +14,10 @@ module Piston
14
14
  FileUtils.rm_rf(dir)
15
15
  end
16
16
 
17
+ my_info = YAML::load(svn(:info, File.join(dir, '..')))
18
+ my_revision = YAML::load(svn(:info, my_info['URL']))['Revision']
19
+ raise Piston::CommandError, "#{File.expand_path(File.join(dir, '..'))} is out of date - run svn update" unless my_info['Revision'] == my_revision
20
+
17
21
  info = YAML::load(svn(:info, repos))
18
22
  options = [:export]
19
23
  options << ['--revision', revision] if revision
@@ -30,7 +34,7 @@ module Piston
30
34
  svn :propset, Piston::ROOT, repos, dir
31
35
  svn :propset, Piston::UUID, info['Repository UUID'], dir
32
36
  svn :propset, Piston::REMOTE_REV, revision, dir
33
- svn :propset, Piston::LOCAL_REV, YAML::load(svn(:info))['Last Changed Rev'], dir
37
+ svn :propset, Piston::LOCAL_REV, my_revision, dir
34
38
  svn :propset, Piston::LOCKED, revision, dir if lock
35
39
 
36
40
  logging_stream.puts "Exported r#{revision} from '#{repos}' to '#{dir}'"
@@ -25,8 +25,8 @@ module Piston
25
25
  new_remote_rev = info['Last Changed Rev'].to_i
26
26
  next skip(dir, "unchanged from revision #{remote_revision}") if remote_revision == new_remote_rev
27
27
 
28
- info = YAML::load(svn(:info))
29
- new_local_rev = info['Last Changed Rev']
28
+ info = YAML::load(svn(:info, File.join(dir, '..')))
29
+ new_local_rev = info['Revision']
30
30
 
31
31
  revisions = (remote_revision .. (revision || new_remote_rev))
32
32
  svn :checkout, '--ignore-externals', '--revision', revisions.first, repos, dir.tmp
@@ -40,10 +40,14 @@ module Piston
40
40
 
41
41
  case op
42
42
  when 'A'
43
- copy(dir, file)
44
- svn :add, File.join(dir, file)
43
+ if File.directory?(File.join(dir.tmp, file)) then
44
+ svn :mkdir, File.join(dir, file)
45
+ else
46
+ copy(dir, file)
47
+ svn :add, '--force', File.join(dir, file)
48
+ end
45
49
  when 'D'
46
- svn :remove, File.join(dir, file)
50
+ svn :remove, '--force', File.join(dir, file)
47
51
  else
48
52
  copy(dir, file)
49
53
  merges << file
@@ -51,8 +55,12 @@ module Piston
51
55
  end
52
56
 
53
57
  merges.each do |file|
54
- svn :merge, '--revision', (local_revision.succ .. new_local_rev).to_svn, File.join(dir, file), File.join(dir, file)
55
- end unless local_revision == new_local_rev
58
+ begin
59
+ svn :merge, '--quiet', '--revision', (local_revision.succ .. new_local_rev).to_svn, File.join(dir, file), File.join(dir, file)
60
+ rescue RuntimeError
61
+ next if $!.message =~ /Unable to find repository location for/
62
+ end
63
+ end unless local_revision.succ == new_local_rev
56
64
 
57
65
  FileUtils.rm_rf dir.tmp
58
66
 
@@ -2,7 +2,7 @@ module Piston
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/piston.rb CHANGED
@@ -18,7 +18,7 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- # $HeadURL: svn://rubyforge.org/var/svn/piston/tags/1.0.0/lib/piston.rb $
21
+ # $HeadURL: svn://rubyforge.org/var/svn/piston/tags/1.0.1/lib/piston.rb $
22
22
  # $Id: piston.rb 11 2006-08-25 02:47:12Z fbos $
23
23
 
24
24
  require 'yaml'
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: piston
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
6
+ version: 1.0.1
7
7
  date: 2006-08-25 00:00:00 +00:00
8
8
  summary: Piston is a utility that enables merge tracking of remote repositories.
9
9
  require_paths:
@@ -37,9 +37,8 @@ files:
37
37
  - lib/core_ext
38
38
  - lib/piston
39
39
  - lib/piston.rb
40
- - lib/core_ext/core_ext
41
- - lib/core_ext/core_ext/string.rb
42
- - lib/core_ext/core_ext/range.rb
40
+ - lib/core_ext/string.rb
41
+ - lib/core_ext/range.rb
43
42
  - lib/piston/commands
44
43
  - lib/piston/ui
45
44
  - lib/piston/command_error.rb