[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.1-20110619-265-g56c72d5)



The branch, master has been updated
       via  56c72d5f24d6c80d47d6c114a1bcae1156c68ce6 (commit)
       via  79713159cdb78fc17f48c7cd2ad34c130a33fb96 (commit)
      from  8741d194a6c2fa304d15123d398a9c3758169e6e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 NEWS                      |    4 ++
 utils/README              |    6 +++
 utils/docs/Makefile.am    |    2 +-
 utils/docs/schdiff.1      |   80 +++++++++++++++++++++++++++++++++++++++++++++
 utils/scripts/Makefile.am |    4 +-
 utils/scripts/schdiff     |   70 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 163 insertions(+), 3 deletions(-)
 create mode 100644 utils/docs/schdiff.1
 create mode 100644 utils/scripts/schdiff


=================
 Commit Messages
=================

commit 56c72d5f24d6c80d47d6c114a1bcae1156c68ce6
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    schdiff: Use a here document for usage.

:100644 100644 8027bfc... 30284ee... M	utils/scripts/schdiff

commit 79713159cdb78fc17f48c7cd2ad34c130a33fb96
Author: Alan Somers <asomers@xxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    schdiff, a graphical diff tool for schematics.
    
    Closes-bug: lp-1442898

:100644 100644 576ac82... 1efffb5... M	NEWS
:100644 100644 d877206... 6d23ee8... M	utils/README
:100644 100644 53c23be... 70cd8f5... M	utils/docs/Makefile.am
:000000 100644 0000000... 975cbfe... A	utils/docs/schdiff.1
:100644 100644 5ab4527... 76e629b... M	utils/scripts/Makefile.am
:000000 100644 0000000... 8027bfc... A	utils/scripts/schdiff

=========
 Changes
=========

commit 56c72d5f24d6c80d47d6c114a1bcae1156c68ce6
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    schdiff: Use a here document for usage.

diff --git a/utils/scripts/schdiff b/utils/scripts/schdiff
index 8027bfc..30284ee 100644
--- a/utils/scripts/schdiff
+++ b/utils/scripts/schdiff
@@ -2,25 +2,31 @@
 
 usage ()
 {
-  echo Usage: 
-  echo \\tschdiff firstfile secondfile
-  echo \\tView a graphical diff of gschem schematics
-  echo
-  echo \\tTo use with git, just place this script in your PATH and do
-  echo \\tgit difftool -x schdiff ...
-  echo
-  echo \\tTo use with mercurial, add the following lines to your .hgrc:
-  echo \\t\\t[extensions]
-  echo \\t\\thgext.extdiff =
-  echo \\t\\t[extdiff]
-  echo \\t\\tcmd.schdiff = /PATH/TO/schdiff
-  echo \\tthen to invoke it, do
-  echo \\thg schdiff ...
-  echo
-  echo \\tTo use with subversion, place it in your PATH and do
-  echo \\tsvn diff --diff-cmd schdiff ...
-
-  echo \\tRequirements: Imagemagick and gschem be installed
+  cat <<EOF
+Usage: schdiff old new
+
+View a graphical diff of gEDA schematics using gschem and ImageMagick.
+
+Usage with git:
+  git difftool -x schdiff ...
+
+Usage with Mercurial:
+  Add the following to .hgrc:
+
+    [extensions]
+    hgext.extdiff =
+    [extdiff]
+    cmd.schdiff = /path/to/schdiff
+
+  Then use: hg schdiff ...
+
+Usage with Subversion:
+  svn diff --diff-cmd schdiff
+
+Report bugs to <http://bugs.launchpad.net/geda>
+gEDA/gaf homepage <http://gpleda.org/>
+EOF
+
 }
 
 for PROG in gschem composite display

commit 79713159cdb78fc17f48c7cd2ad34c130a33fb96
Author: Alan Somers <asomers@xxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    schdiff, a graphical diff tool for schematics.
    
    Closes-bug: lp-1442898

diff --git a/NEWS b/NEWS
index 576ac82..1efffb5 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ Notable changes in gEDA/gaf 1.7.2
   platforms, including Windows.  The `locate' tool is no longer used
   to search for component documentation files.
 
+* The `schdiff' tool for generating visual diffs of schematics and
+  symbols has been added.  It can be used with most version control
+  systems.  See `man schdiff' for more details.
+
 * The `bom' and `bom2' backends to `gnetlist' now give error messages
   if no attribute file can be found.  The `-O attrib_file=FILE' and
   `-O attribs=ATTRIB,ATTRIB...' options have also been added.
diff --git a/utils/README b/utils/README
index d877206..6d23ee8 100644
--- a/utils/README
+++ b/utils/README
@@ -218,6 +218,12 @@ README for utilities
     garchive requires python to run.  
     Run:  garchive -h  for help information.
  
+    
+    schdiff
+    Alan Somers
+    This script is used to produce graphical diffs of gschem files.  It 
+    integrates with Git, Mercurial, and Subversion.  It requires ImageMagick
+    to run.  Run schdiff -h for usage instructions.
 
 - License  
 
diff --git a/utils/docs/Makefile.am b/utils/docs/Makefile.am
index 53c23be..70cd8f5 100644
--- a/utils/docs/Makefile.am
+++ b/utils/docs/Makefile.am
@@ -15,7 +15,7 @@ else
 	@echo 'The documentation cannot be built from the sources.'
 endif
 
-dist_man_MANS = gsch2pcb.1 grenum.1 gxyrs.1 refdes_renum.1
+dist_man_MANS = gsch2pcb.1 grenum.1 gxyrs.1 refdes_renum.1 schdiff.1
 
 
 # Rules for converting man->html
diff --git a/utils/docs/schdiff.1 b/utils/docs/schdiff.1
new file mode 100644
index 0000000..975cbfe
--- /dev/null
+++ b/utils/docs/schdiff.1
@@ -0,0 +1,80 @@
+.TH schdiff 1 "December 11th, 2011" "gEDA Project" 1.7.1.20110619
+
+.SH NAME
+.B schdiff
+\- Graphical diff tool for schematics
+
+.SH SYNOPSIS
+.B schdiff
+.I infile1.sch infile2.sch
+
+
+.SH DESCRIPTION
+
+The
+.B schdiff
+program will use 
+.B ImageMagick(1)
+to display a graphical diff of two gschem schematic files.  It's most useful
+when combined with a revision control system so it can compare two revisions of
+the same file, review changes, etc.  However, it is limited in that it can only
+compare two files at a time; it cannot diff entire directories nor can it diff
+an entire revision (unless that revision affected only one file).  It can
+easily be configured to work with most revision control systems.  Here are
+instructions for three:
+
+.B git:
+Use the 
+.B difftool
+command exactly as you would use
+.B diff
+, but supply the
+.B \-x schdiff
+option.
+
+.B mercurial:
+Use the 
+.B schdiff
+command exactly as you would use
+.B diff
+, but add the following lines to your .hgrc:
+
+.RS
+  [extensions]
+  hgext.extdiff =
+  [extdiff]
+  cmd.schdiff = schdiff
+.RE
+
+.B subversion:
+Use the
+.B diff
+command like normal, but supply the
+.B --diff-cmd schdiff
+option.
+
+.SH EXAMPLES
+
+.TP
+Use git to view the changes to a file between two revisions
+git difftool -x schdiff 182110f690c51eb53ea1799fd022e87322d742e3 039e012397f2638d1577dd7c80fb862a5503dbfd cpu.sch
+
+.TP
+Use mercurial to see all the changes since a specific revision
+hg schdiff -r 8442880f9835 cpld.sch
+
+.TP
+Use subversion to review a specific revision
+svn diff --diff-cmd schdiff -c 49 power.sch
+
+.SH BUGS
+
+If you find one, please report it at https://bugs.launchpad.net/geda
+
+.SH AUTHOR
+
+Alan Somers
+
+.SH SEE ALSO
+
+.B composite(1), display(1), git(1), gschem(1), hg(1), svn(1)
diff --git a/utils/scripts/Makefile.am b/utils/scripts/Makefile.am
index 5ab4527..76e629b 100644
--- a/utils/scripts/Makefile.am
+++ b/utils/scripts/Makefile.am
@@ -4,12 +4,12 @@
 
 bin_SCRIPTS = sarlacc_sym gschupdate gsymupdate refdes_renum \
 	      tragesym pads_backannotate pcb_backannotate garchive gsymfix.pl \
-	      gnet_hier_verilog.sh
+	      gnet_hier_verilog.sh schdiff
 
 EXTRA_DIST = convert_sym.awk gpstoimage mk_char_tab.pl \
 	     sarlacc_sym gschupdate gsymupdate refdes_renum gsymfix.pl \
 	     tragesym pads_backannotate pcb_backannotate garchive.py \
-	     gnet_hier_verilog.sh
+	     gnet_hier_verilog.sh schdiff
 
 ##  SDB's stuff to enable garchive.  This hardcodes the path to the
 ##  system libraries into garchive prior to installation.
diff --git a/utils/scripts/schdiff b/utils/scripts/schdiff
new file mode 100644
index 0000000..8027bfc
--- /dev/null
+++ b/utils/scripts/schdiff
@@ -0,0 +1,64 @@
+#! /bin/sh
+
+usage ()
+{
+  echo Usage: 
+  echo \\tschdiff firstfile secondfile
+  echo \\tView a graphical diff of gschem schematics
+  echo
+  echo \\tTo use with git, just place this script in your PATH and do
+  echo \\tgit difftool -x schdiff ...
+  echo
+  echo \\tTo use with mercurial, add the following lines to your .hgrc:
+  echo \\t\\t[extensions]
+  echo \\t\\thgext.extdiff =
+  echo \\t\\t[extdiff]
+  echo \\t\\tcmd.schdiff = /PATH/TO/schdiff
+  echo \\tthen to invoke it, do
+  echo \\thg schdiff ...
+  echo
+  echo \\tTo use with subversion, place it in your PATH and do
+  echo \\tsvn diff --diff-cmd schdiff ...
+
+  echo \\tRequirements: Imagemagick and gschem be installed
+}
+
+for PROG in gschem composite display
+do
+  if which $PROG > /dev/null
+  then 
+    true
+  else 
+    echo "$PROG is not found.  Either it is not installed, or not in your PATH"
+    exit 1
+  fi
+done
+
+if test $# -lt 2
+  then usage; exit 1
+fi
+
+#In case the script was invoked with extra option arguments, throw them away
+shift `expr $# - 2`
+
+if test -d $1 -o -d $2
+  then echo "ERROR: schdiff cannot diff entire directories"
+  exit 1
+fi
+
+LEFTFILE=$1
+RIGHTFILE=$2
+
+GEDASCHEMEDIR=share/gEDA/scheme
+SCHEMEFILE=`dirname $0`/../${GEDASCHEMEDIR}/schdiff-image.scm
+LEFTPNG=`mktemp --tmpdir schdiff.XXXXXXXXXX`
+RIGHTPNG=`mktemp --tmpdir schdiff.XXXXXXXXXX`
+DIFFPNG=`mktemp --tmpdir schdiff.XXXXXXXXXX`
+
+gschem -p -o $LEFTPNG -q -c '(image-size 1344 1008) (image-color "disabled") (gschem-use-rc-values) (gschem-image "dummyfilename") (gschem-exit)' $LEFTFILE && \
+gschem -p -o $RIGHTPNG -q -c '(image-size 1344 1008) (image-color "disabled") (gschem-use-rc-values) (gschem-image "dummyfilename") (gschem-exit)' $RIGHTFILE && \
+composite -stereo 0 $LEFTPNG $RIGHTPNG $DIFFPNG && \
+display $DIFFPNG
+rm $LEFTPNG
+rm $RIGHTPNG
+rm $DIFFPNG




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs