X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Mailer: exmh version 2.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5 X-Exmh-Isig-CompType: comp X-Exmh-Isig-Folder: inbox From: karl AT aspodata DOT se To: geda-user AT delorie DOT com Subject: [geda-user] how to get the version nr (or similar) Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20140311151052.109D48020170@turkos.aspodata.se> Date: Tue, 11 Mar 2014 16:10:51 +0100 (CET) X-Virus-Scanned: ClamAV using ClamSMTP Reply-To: geda-user AT delorie DOT com How can I identify if a given file is handled by git/cvs/svn/hg ? If I know that, how can I get the version number of the file ? /// (Given file in dir, which is the current dir) Identification rcs does file,v or RCS/file,v exist cvs does dir CVS exist git does dir .git (or ../.git etc.) exist and contain the dirs objects and refs svn dir contains dir .svn hg ??? /// version string rcs $ rcs -i zz RCS file: zz,v enter description, terminated with single '.' or end of file: NOTE: This is NOT the log message! >> test >> . done $ ci zz zz,v <-- zz initial revision: 1.1 done $ rlog zz | grep ^revision revision 1.1 $ cvs $ cd /Net/cvs/cvs.gedasymbols.org/www/user/ales_hvezda/symbols/ $ grep 16c450n-1.sym CVS/Entries | ( IFS=/ read a b c d; echo $c ) 1.1 $ git $ git log 74lvc14a.sym | head -1 commit 1adbdbd403067976580f4a3a45227fc40b3784d3 $ svn ??? hg ??? /// Are thoose above the best way to do it ? Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57