+vcs-tree (0.4.0-1) unstable; urgency=low
+
+ * New upstream: support git
+ * Convert to Debhelper 7
+ * Simplify debian/rules
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Thu, 20 Aug 2009 16:47:28 -0600
+
vcs-tree (0.3.2-4) unstable; urgency=low
* Add Vcs-Browser field
Section: vcs
Priority: optional
Maintainer: Kevin M. Rosenberg <kmr@debian.org>
-Build-Depends: debhelper (>> 5.0.0), sbcl (>= 0.9.4)
-Standards-Version: 3.8.2.0
+Build-Depends: debhelper (>> 7.0.0), sbcl (>= 0.9.4)
+Standards-Version: 3.8.3.0
Vcs-Git: git://git.b9.com/vcs-tree.git
Vcs-Browser: http://git.b9.com/?p=vcs-tree.git
Package: vcs-tree
Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Version Control System Tree Walker
vcs-tree walks through a directory tree and performs actions on CVS
or Subversion directories. vcs-tree works differently than just using
pkg := vcs-tree
debpkg := vcs-tree
-
-
-bin-dir := usr/bin
-doc-dir := usr/share/doc/$(debpkg)
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- touch configure-stamp
-
+bin-dir := usr/bin
build: build-stamp
-build-stamp: configure-stamp
+build-stamp:
dh_testdir
- # Add here commands to compile the package.
$(MAKE) _${pkg}
touch build-stamp
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
- # Add here commands to clean up after the build process.
$(MAKE) clean
rm -f debian/${debpkg}.postinst.* debian/${debpkg}.prerm.*
dh_clean
install: build
dh_testdir
dh_testroot
- dh_clean -k
- # Add here commands to install the package into debian/xlunit.
+ dh_prep
dh_installdirs $(bin-dir)
dh_install $(pkg) $(bin-dir)
dh_install _$(pkg) $(bin-dir)
-# Build architecture-independent files here.
-binary-indep: build install
-
+binary-indep:
-# Build architecture-dependent files here.
-binary-arch: build install
+binary-arch: install
dh_testdir
dh_testroot
-# dh_installdebconf
dh_installdocs
dh_installexamples
-# dh_installmenu
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_installinit
-# dh_installcron
dh_installman $(pkg).1
dh_link usr/share/man/man1/$(pkg).1 usr/share/man/man1/_$(pkg).1
-# dh_installinfo
-# dh_undocumented
dh_installchangelogs
# don't strip sbcl binary or will remove vcs-tree code
dh_strip -X_$(pkg)
dh_compress
dh_fixperms
-# dh_makeshlibs
dh_installdeb
-# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+binary: binary-arch
+
+.PHONY: build clean binary-indep binary-arch binary install
(string= "CVS"
(car (last (pathname-directory x))))
(string= ".svn"
+ (car (last (pathname-directory x))))
+ (string= ".git"
(car (last (pathname-directory x)))))))
(defun is-cvs-managed (dir)
(make-pathname :directory '(:relative ".svn"))
dir)))
+(defun is-git-managed (dir)
+ (probe-directory (merge-pathnames
+ (make-pathname :directory '(:relative ".git"))
+ dir)))
+
(defun filter-tree (tree)
"Called for a directory tree. First argument is name of current tree.
-Returns a list of directories managed by CVS or SVN."
+Returns a list of directories managed by CVS, SVN, or GIT."
(when (and (listp tree) (not (is-vcs-directory (car tree))))
(let* ((managed-pair
(cond
(car (last (pathname-directory (car x))))))
:test 'equal)
(cons (car tree) :svn))
+ ((find ".git" (cdr tree)
+ :key (lambda (x) (when (pathnamep (car x))
+ (car (last (pathname-directory (car x))))))
+ :test 'equal)
+ (cons (car tree) :git))
((find "CVS" (cdr tree)
:key (lambda (x) (when (pathnamep (car x))
(car (last (pathname-directory (car x))))))
(:svn
(make-pathname :name "entries" :type nil
:directory '(:relative ".svn")))
+ (:git
+ (make-pathname :name "HEAD" :type nil
+ :directory '(:relative ".git")))
(:cvs
(make-pathname :name "Entries" :type nil
:directory '(:relative "CVS"))))
(entries (read-file-to-strings entries-path))
(dir-name (car (last (pathname-directory subdir))))
(match (case type
- (:svn
+ ((:svn :git)
(concatenate 'string "name=\"" dir-name "\""))
(:cvs
(concatenate 'string "D/" dir-name "////")))))
(case type
- (:svn
+ ((:svn :git)
(some (lambda (line) (string= match (string-trim-whitespace line)))
entries))
(:cvs
(let* ((vcs-cmd
(ecase action
(:update
- (format nil "~A update" type-name))
+ (cond
+ ((equal type-name "git")
+ (format nil "~A pull" type-name))
+ (t
+ (format nil "~A update" type-name))))
(:status
(format nil "~A status" type-name))
(:commit
(process dir "cvs"))
((is-svn-managed dir)
(process dir "svn"))
+ ((is-git-managed dir)
+ (process dir "git"))
(t
(format *error-output*
"INTERAL ERROR: not a version control system directory ~A" dir)