Jump to content

Linux command line diff?


Recommended Posts

Hello PlasticSCM,


I am a command line junkie (I claim for the speed and convenience), and would like to be able to diff my entire workspace from the CLI.  However, when I do what seems to be the obvious cm diff, nothing seems to give me the actual differences between files.  (The documentation for the CLI is frighteningly sparse, unless I'm looking in the wrong spot, of course!)  My example CLI interactions:


  1. This does not return a list of differences between between files, instead giving me the usage.
    $ cm diff
    Show differences between files, changesets and labels.
  2. Okay, I got it wrong.  Let's try a difference between my workspace and the branch:

    $ cm diff main
    C "/home/kevin/devel/myproject/important_file"
  3. Okay, that listed what has changed, but not the actual hunk differentials.  Let's try:

    $ cm diff important_file

    That seems to work, except that it opens a GUI window; I want the differences printed out to the terminal.  Further, this only works for an individual file.

So, my question: how do I print file differences to the terminal, and do it for all changed, added, deleted, and moved files?  (Such as to what I'm accustomed with svn diff, or git diff.)





Link to comment
Share on other sites

Hi Kevin,


the "cm diff" command will behave different depending on the objects you are diffing.


If you are diffing a file then the default diff tool will be launched, by default the graphical one is set to do so. If you need to run CLI diff operations you can change the plastic diff tool in order to use another one.


Then if you are diffing a plastic scm changeset or a plastic scm branch you will get a list of changed items, unfortunately you can't change this behavior now but you can create an script to first diff the branch (or changeset), grab the changed items and run the diff for each of them.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...