Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 19 lines (15 sloc) 0.395 kB
#!/usr/bin/env ruby
#
# Usage: hg-export [ARGUMENTS_FOR_HG_LOG...]
#
# Exports revisions from Mercurial as diff(1) patch files.
#
# Written in 2006 by Suraj N. Kurapati <https://github.com/sunaku>
revs = `hg log #{ARGV.join(' ')}`.scan(/changeset:\s+(\d+):/)
revs.flatten!
File.open('manifest', 'w') do |f|
f.puts revs
end
revs.each do |r|
system 'hg', 'export', '-o', "#{r}.diff", r
end
Jump to Line
Something went wrong with that request. Please try again.