Check-in Number:
|
4958 | |
Date: |
2005-Jan-13 12:12:58 (local)
2005-Jan-13 11:12:58 (UTC) |
User: | rse |
Branch: | |
Comment: |
1. Add a convenient "svs status" command which output a "cvs update"
style list of files and their status (modification or conflict).
2. Remove *.rej files on "svs vi" if a modification was done.
3. Fix "make uninstall" procedure. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/svs/ChangeLog 1.3 -> 1.4
--- ChangeLog 2004/12/17 09:52:08 1.3
+++ ChangeLog 2005/01/13 11:12:58 1.4
@@ -10,6 +10,16 @@
Changes between 1.0.0 and 1.0.1 (14-Dec-2004 to 16-Dec-2004):
+ *) Add a convenient "svs status" command which output a "cvs update"
+ style list of files and their status (modification or conflict).
+ [Ralf S. Engelschall]
+
+ *) Remove *.rej files on "svs vi" if a modification was done.
+ [Ralf S. Engelschall]
+
+ *) Fix "make uninstall" procedure.
+ [Ralf S. Engelschall]
+
*) When editing a file look for corresponding .rej file
and if found and the editor is Vim, open both files.
[Ralf S. Engelschall]
|
|
ossp-pkg/svs/Makefile.in 1.1 -> 1.2
--- Makefile.in 2004/12/14 19:18:37 1.1
+++ Makefile.in 2005/01/13 11:12:58 1.2
@@ -67,9 +67,10 @@
# perform uninstallation procedure
uninstall:
- -$(RM) $(DESTDIR)$(mandir)/bin/svs
+ -$(RM) $(DESTDIR)$(bindir)/svs
-$(RM) $(DESTDIR)$(mandir)/man1/svs.1
-$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE)
-$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
-$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
|
|
ossp-pkg/svs/svs.pod 1.1 -> 1.2
--- svs.pod 2004/12/14 19:18:37 1.1
+++ svs.pod 2005/01/13 11:12:58 1.2
@@ -43,9 +43,11 @@
=item B<svs> vi I<file> [...]
-=item B<svs> diff I<file>|I<dir> [...]
+=item B<svs> diff [I<file>|I<dir> [...]]
+
+=item B<svs> backout [I<file>|I<dir> [...]]
-=item B<svs> backout I<file>|I<dir> [...]
+=item B<svs> status [I<file>|I<dir> [...]]
=back
@@ -118,6 +120,12 @@
This backouts all changes made to files where an I<file>C<.orig> exists.
The I<file>C<.orig> files are removed, too.
+=item B<svs> status [I<file>|I<dir> [...]]
+
+This shows a short status of files I<file> where an I<file>C<.orig> or I<file>C<.rej> file exists.
+A prefix of "C<M>" indicates a modification (a I<file>C<.orig> exists).
+A prefix of "C<C>" indicates a conflict (a I<file>C<.rej> exists).
+
=back
=head1 HISTORY
|
|
ossp-pkg/svs/svs.sh 1.3 -> 1.4
--- svs.sh 2004/12/17 09:52:08 1.3
+++ svs.sh 2005/01/13 11:12:58 1.4
@@ -33,6 +33,7 @@
echo "Usage: svs vi <file> [...]"
echo "Usage: svs diff [<file>|<dir> [...]]"
echo "Usage: svs backout [<file>|<dir> [...]]"
+ echo "Usage: svs status [<file>|<dir> [...]]"
exit 1
fi
@@ -74,6 +75,9 @@
rm -f $file.orig
else
echo "svs: changes made (preserving original)"
+ if [ -f $file.rej ]; then
+ rm -f $file.rej
+ fi
fi
done
;;
@@ -177,6 +181,42 @@
fi
done
;;
+
+ s|st|sta|stat|statu|status )
+ ##
+ ## CHANGE STATUS
+ ##
+
+ # determine file list
+ if [ $# -eq 0 ]; then
+ set -- .
+ fi
+ files=""
+ for file in "$@"; do
+ if [ -d $file ]; then
+ for f in `find $file -type f \( -name "*.orig" -or -name "*.rej" \) -print | sort`; do
+ files="$files $f"
+ done
+ elif [ -f $file ]; then
+ files="$files $file"
+ else
+ echo "svs:ERROR: \"$file\" neither regular file nor directory" 1>&2
+ exit 1
+ fi
+ done
+
+ # show status on files
+ for file in $files; do
+ file=`echo "$file" | sed -e 's;^\./;;' -e 's;/\./;/;g' -e 's;\([^/][^/]*\)/\.\.;;g' -e 's;//*;/;g'`
+ prefix="?"
+ case "$file" in
+ *.orig ) prefix="M" ;;
+ *.rej ) prefix="C" ;;
+ esac
+ echo "$prefix $file"
+ done
+ ;;
+
* )
echo "svs:ERROR: invalid command \"$cmd\"" 1>&2
exit 1
|
|