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:


$ gem install piston

What does piston diff report ? Here it is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$ piston help diff
diff: Shows the differences between the local repository and the pristine upstream
usage: diff [DIR [...]]

  This operation has the effect of producing a diff between the pristine upstream
  (at the last updated revision) and your local version.  In other words, it
  gives you the changes you have made in your repository that have not been
  incorporated upstream.

Valid options:
    -v, --verbose                    Show subversion commands and results as they are executed
    -q, --quiet                      Do not output any messages except errors
    -r, --revision=REVISION
    -u, --show-updates               Query the remote repository for out of dateness information
    -l, --lock                       Close down and lock the imported directory from further changes
        --dry-run                    Does not actually execute any commands
        --force                      Force the command to run, even if Piston thinks it would cause a problem

$ piston diff vendor/rails
Processing 'vendor/rails'...
  Fetching remote repository's latest revision and UUID
  Checking out repository at revision 8784
diff -urN --exclude=.svn vendor/rails.tmp/actionmailer/lib/action_mailer/base.rb vendor/rails/actionmailer/lib/action_mailer/base.rb
--- vendor/rails.tmp/actionmailer/lib/action_mailer/base.rb        2008-02-08 22:38:25.000000000 -0500
+++ vendor/rails/actionmailer/lib/action_mailer/base.rb        2008-01-11 17:05:42.000000000 -0500
@@ -348,7 +348,7 @@
       #     end
       #   end
       def receive(raw_email)
-        logger.info "Received mail:\n #{raw_email}" unless logger.nil?
+        logger.debug "Received mail:\n #{raw_email}" unless logger.nil?
         mail = TMail::Mail.parse(raw_email)
         mail.base64_decode
         new.receive(mail)
@@ -445,7 +445,7 @@
     # no alternate has been given as the parameter, this will fail.
     def deliver!(mail = @mail)
       raise "no mail object available for delivery!" unless mail
-      logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?
+      logger.debug "Sent mail:\n #{mail.encoded}" unless logger.nil?
 
       begin
         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/

 

Search

A picture of me

I am François Beausoleil, a Ruby on Rails coder. During the day, I work on XLsuite. At night, I am interested many things. Read my biography

Tags

(3) (1) (0) (2) (1) (1) (2) (2) (1) (2) (1) (2) (1) (2) (1) (1) (1) (1) (2) (14) (1) (1) (1) (1) (2) (1) (1) (2) (0) (1) (2) (1) (3) (1) (1) (1) (1) (1) (1) (0) (3) (2) (1) (2) (2) (1) (3) (2) (8) (8) (9) (12) (1) (1) (3) (1) (1) (1) (1) (1) (1) (2) (2) (2) (1) (1) (3) (1) (3) (1) (0) (23) (1) (1) (0) (1) (1) (1) (23) (25) (1) (1) (13) (1) (1) (2) (3) (1) (1) (4) (1) (2) (3) (0) (1) (7) (3) (1) (5) (5) (2) (2) (2) (4) (6) (7) (1) (0) (1) (1) (2) (2) (1) (4) (12) (2) (1) (2) (4) (1) (1) (1) (2) (8) (2) (3) (2) (2) (1) (3) (1) (1)

Links

Projects I work on

Categories

Archives