source: an2_revision.m @ 73

Last change on this file since 73 was 73, checked in by tjniskan, 11 years ago
  • Fixed a bug in aedes.m when viewing "voxel time-series" from generic

matrix input

  • Fixed a small issue with some arrayed experiments in an2_readfid.m

and hopefully did not break anything this time

  • Few minor corrections and changes here and there...

M misclib/fmri_filter.m
M misclib/fmri_corr.m
M an2_revision.m
M an2_fitmaps.m
M aedes.m
M plugins/resting_state_fc.m
M an2_readfid.m

  • Property svn:executable set to *
  • Property svn:keywords set to Revision HeadURL
File size: 2.1 KB
Line 
1function [rev,repo,workingcopy] = an2_revision()
2% AN2_REVISION - Returns the current revision of Aedes
3%   
4%
5% Synopsis:
6%        [rev,repo,workingcopy] = an2_revision;
7%
8% Description:
9%
10% Examples:
11%
12% See also:
13%
14
15% This function is a part of Aedes - A graphical tool for analyzing
16% medical images
17%
18% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
19%
20% Department of Physics, Department of Neurobiology
21% University of Kuopio, FINLAND
22%
23% This program may be used under the terms of the GNU General Public
24% License version 2.0 as published by the Free Software Foundation
25% and appearing in the file LICENSE.TXT included in the packaging of
26% this program.
27%
28% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30
31
32rev = [];
33repo = '';
34
35% Get path to the svn working copy
36fname= mfilename('fullpath');
37[fp,fn,fe] = fileparts(fname);
38workingcopy = [fp,filesep];
39
40% Check if working copy is under version control.
41if ~(exist([workingcopy,'.svn'])==7)
42  rev = '$Revision: 73 $';
43  rev = str2num(rev(12:end-2));
44  return
45end
46
47% Check the current repository and revision
48if isunix
49  s = [];
50  w = [];
51  [s,w] = unix(['svn info "',fp,'"']);
52  if isempty(w)
53        return
54  end
55elseif ispc
56  s = [];
57  w = [];
58  [s,w] = dos(['svn info "',fp,'"']);
59  if isempty(w)
60        return
61  end
62else
63 
64end
65
66% Scan the lines from the output
67C=textscan(w,'%s','delimiter','\n');
68if ~isempty(C)
69  C=C{:};
70else
71  return
72end
73
74% Get URL line
75url_ind = find(strncmpi(C,'URL:',4));
76if ~isempty(url_ind)
77  url_str = C{url_ind}(6:end);
78else
79  return
80end
81repo = url_str;
82
83% Hard-coded to "trunk" at the moment. In the future this will be the only
84% repo available...
85%repo = 'trunk';
86
87
88% Get revision line
89rev_ind = find(strncmpi(C,'Revision:',4));
90if ~isempty(rev_ind)
91  rev_str = C{rev_ind};
92else
93  return
94end
95rev=str2num(rev_str(11:end));
96
97% The next comment line is changed in every commit by the svncommit
98% bash-script every time it is called so that this file "an2_revision.m" is
99% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
100% - SVN Hook -
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008