Well, thanks to Graeme Mathieson, Piston finally sports a piston diff subcommand. This command allows you to know what changes you made vs what’s in the remote repository.
As usual, installation is pretty simple:
What does piston diff report ? Here it is:
1 $ piston help diff
2 diff: Shows the differences between the local repository and the pristine upstream
3 usage: diff [DIR […]]
4
5 This operation has the effect of producing a diff between the pristine upstream
6 (at the last updated revision) and your local version. In other words, it
7 gives you the changes you have made in your repository that have not been
8 incorporated upstream.
9
10 Valid options:
11 v, —verbose Show subversion commands and results as they are executed
12 -q, —quiet Do not output any messages except errors
13 -r, —revision=REVISION
14 -u, —show-updates Query the remote repository for out of dateness information
15 -l, —lock Close down and lock the imported directory from further changes
16 —dry-run Does not actually execute any commands
17 —force Force the command to run, even if Piston thinks it would cause a problem
18
19 $ piston diff vendor/rails
20 Processing ‘vendor/rails’…
21 Fetching remote repository’s latest revision and UUID
22 Checking out repository at revision 8784
23 diff -urN —exclude=.svn vendor/rails.tmp/actionmailer/lib/action_mailer/base.rb vendor/rails/actionmailer/lib/action_mailer/base.rb
24 -- vendor/rails.tmp/actionmailer/lib/action_mailer/base.rb 2008-02-08 22:38:25.000000000 -0500
25 + vendor/rails/actionmailer/lib/action_mailer/base.rb 2008-01-11 17:05:42.000000000 -0500
26 @ -348,7 +348,7 @
27 # end
28 # end
29 def receive(raw_email)
30 – logger.info "Received mail:\n #{raw_email}" unless logger.nil?
31 + logger.debug "Received mail:\n #{raw_email}" unless logger.nil?
32 mail = TMail::Mail.parse(raw_email)
33 mail.base64_decode
34 new.receive(mail)
35 @ -445,7 +445,7 @
36 # no alternate has been given as the parameter, this will fail.
37 def deliver!(mail = @mail)
38 raise "no mail object available for delivery!" unless mail
39 – logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?
40 + logger.debug "Sent mail:\n #{mail.encoded}" unless logger.nil?
41
42 begin
43 send("perform_delivery_#{delivery_method}", mail) if perform_deliveries
Caveat: piston diff uses the command line version of diff. This means Windows users will need to install a compatible version, or write a wrapper script around some preferred tool that supports the same features.
What is Piston ?
Piston is a utility that eases vendor branch management. This is similar to svn:externals, except you have a local copy of the files, which you can modify at will. As long as the changes are mergeable, you should have no problems.
Visit Piston’s home page at http://piston.rubyforge.org/