motomike-bnr_tools 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 0
3
- :patch: 5
3
+ :patch: 6
4
4
  :major: 0
data/bin/taggit CHANGED
@@ -15,6 +15,7 @@ CURRENT_RELEASE_BRANCH="9.4"
15
15
 
16
16
  opts = Trollop::options do
17
17
  opt :ticket, "A ticket number optionally followed by one or more changesets to merge", :type => :ints, :multi => true
18
+ opt :deticket, "A ticket number optionally followed by one or more changesets to UN-merge", :type => :ints, :multi => true
18
19
  opt :wc_root_path, "Root path to a working copy of the repository we can do merge gymnastics in", :default => "#{ENV["HOME"]}/diggRepository"
19
20
  opt :release_branch, "Name of the release branch which will be the merge target", :default => CURRENT_RELEASE_BRANCH, :required => true, :multi => true
20
21
  end
@@ -25,5 +26,9 @@ Array(opts[:release_branch]).each { |release_branch|
25
26
  ticket, *changesets = *ticketRefAndChangesets
26
27
  tickets << Ticket.new(ticket, changesets, opts[:wc_root_path], release_branch)
27
28
  }
29
+ opts[:deticket].each { |ticketRefAndChangesets|
30
+ ticket, *changesets = *ticketRefAndChangesets
31
+ tickets << Ticket.new(ticket, changesets.map { |cs| -cs } , opts[:wc_root_path], release_branch)
32
+ }
28
33
  Mergeinator.new(opts[:wc_root_path], release_branch, tickets).mergeStuff
29
34
  }
@@ -15,7 +15,7 @@ class Changeset
15
15
 
16
16
  def modifiedPaths(relativeStartPath = self.wcBasePath)
17
17
  @modified[relativeStartPath] ||= begin
18
- SvnCommands::Log.new(relativeStartPath,"-r #{self.revision}", true).entries.first.paths.map {|p| p.to_s}
18
+ SvnCommands::Log.new(relativeStartPath,"-r #{self.revision.abs}", true).entries.first.paths.map {|p| p.to_s}
19
19
  rescue
20
20
  []
21
21
  end
@@ -48,19 +48,22 @@ class Mergeinator
48
48
  def tagLOLCat
49
49
  ref_msg = self.ticketsToMerge ? "Refs #{(self.ticketsToMerge.map {|t| "#{t}"}).join(", ")}" : "No tickets referenced"
50
50
  if agree("Tagging version #{self.version}. #{ref_msg}\nOkay to proceed? (NB: This will commit to SVN) ")
51
- SvnCommands.copy("LOLcat/branches/#{self.releaseBranch}","LOLcat/tags/#{version}", nil, nil, "Tagged LOLcat-#{version}. #{ref_msg}")
51
+ SvnCommands.copy("LOLcat/branches/#{self.releaseBranch}","LOLcat/tags/#{version}", nil, nil, "Tagged LOLcat-#{version}. #{ref_msg}. External links not yet updated.")
52
52
  SvnCommands.copy("LOLz/branches/#{self.releaseBranch}","LOLz/tags/#{version}", nil, nil, "Tagged LOLz-#{version}. #{ref_msg}")
53
+ SvnCommands::Update.new("LOLcat/tags/#{version}",nil,true,true,self.wcPath) # shallowly checkout the new tag to ~/diggRepository/, no extra args for svn, force update
54
+ t = Tempfile.new("svn_externals").open { |tempfile|
55
+ tempfile.puts "modules svn+ssh://svn.digg.internal/repository/LOLz/tags/#{version}"
56
+ tempfile.puts "build svn+ssh://svn.digg.internal/repository/build/trunk"
57
+ }
58
+ cmd = "svn ps svn:externals --file #{t.path} #{SvnCommands::DIGG_DEFAULT_WC_PATH}/LOLcat/tags/#{version}"
59
+ puts "Running command : #{cmd}"
60
+ puts IO.popen(cmd).readlines
61
+ cmd = %Q{svn commit -m"Tagged LOLcat-#{version}. #{ref_msg}. Updated external links."}
62
+ puts "Running command : #{cmd}"
63
+ puts IO.popen(cmd).readlines
53
64
  else
54
65
  exit(1) unless agree("Oh. Well, would you like to keep going anyway? ")
55
66
  end
56
- SvnCommands::Update.new("LOLcat/tags/#{version}",nil,true,true,self.wcPath) # shallowly checkout the new tag to ~/diggRepository/, no extra args for svn, force update
57
- t = Tempfile.new("svn_externals").open { |tempfile|
58
- tempfile.puts "modules svn+ssh://svn.digg.internal/repository/LOLz/tags/#{version}"
59
- tempfile.puts "build svn+ssh://svn.digg.internal/repository/build/trunk"
60
- }
61
- cmd = "svn ps svn:externals --file #{t.path} #{SvnCommands::DIGG_DEFAULT_WC_PATH}/LOLcat/tags/#{version}"
62
- puts "Running command : #{cmd}"
63
- puts IO.popen(cmd).readlines
64
67
  end
65
68
 
66
69
  def mergeStuff
@@ -106,6 +109,7 @@ class Mergeinator
106
109
  tagLOLCat
107
110
  if agree("Upload modified modules now? ")
108
111
  @module_upload_cmds.each { |cmd|
112
+ puts "Running #{cmd} ..."
109
113
  puts IO.popen(cmd).readlines
110
114
  }
111
115
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motomike-bnr_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Ashmore
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-27 00:00:00 -08:00
12
+ date: 2009-03-04 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15