Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESS EPICS Environment
wrappers
e3-require
Commits
e54cd1ad
Commit
e54cd1ad
authored
14 years ago
by
zimoch
Browse files
Options
Downloads
Patches
Plain Diff
fixed: problem when current dir was not in CVS
parent
4c18b96a
No related branches found
No related tags found
1 merge request
!7
Submodule merge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
App/tools/getVersion.tcl
+25
-12
25 additions, 12 deletions
App/tools/getVersion.tcl
with
25 additions
and
12 deletions
App/tools/getVersion.tcl
+
25
−
12
View file @
e54cd1ad
...
@@ -6,6 +6,16 @@ set global_context [scancontext create]
...
@@ -6,6 +6,16 @@ set global_context [scancontext create]
set file_context
[
scancontext create
]
set file_context
[
scancontext create
]
set skip_context
[
scancontext create
]
set skip_context
[
scancontext create
]
scanmatch $global_context
{
no such directory `
(
.*
)
'
}
{
puts stderr
"checking directory
$match
Info(submatch0): so such directory => version test"
return
}
scanmatch $global_context
{
there is no version here
}
{
puts stderr
"checking current directory: not in cvs => version test"
return
}
scanmatch $global_context
{
^File: .*Up-to-date
}
{
scanmatch $global_context
{
^File: .*Up-to-date
}
{
set file
[
lindex $matchInfo
(
line
)
1
]
set file
[
lindex $matchInfo
(
line
)
1
]
puts -nonewline stderr
"checking
$file:
"
puts -nonewline stderr
"checking
$file:
"
...
@@ -88,21 +98,24 @@ scanmatch $file_context {=================} {
...
@@ -88,21 +98,24 @@ scanmatch $file_context {=================} {
return
return
}
}
#cvs bug: calling cvs status for files in other directories spoils status information for local files.
# cvs bug: calling cvs status for files in other directories spoils status
#fix: make localfiles non-local: x -> ../dir/x
# information for local files.
set dir ../
[
file tail
[
pwd
]]
# fix: check local and non local files separately
set files $dir
set cvsstatus
[
open
"|cvs status -l -v 2>@ stdout"
]
scanfile $global_context $cvsstatus
if
[
catch
{
close $cvsstatus
}]
{
set version test
}
set files
{}
foreach file $argv
{
foreach file $argv
{
if
{[
file tail $file
]
== $file
}
{
if
{[
file tail $file
]
!= $file
}
{
lappend files $dir/$file
}
else
{
lappend files $file
lappend files $file
}
}
}
}
if
[
llength $files
]
{
set cvsstatus
[
open
"|cvs status -l -v
$files
2>
/dev/null
"
]
set cvsstatus
[
open
"|cvs status -l -v
$files
2>
@ stdout
"
]
scanfile $global_context $cvsstatus
scanfile $global_context $cvsstatus
close $cvsstatus
if
[
catch
{
close $cvsstatus
}]
{
set version test
}
}
if
{
!
[
info exists version
]}
{
set version test
}
if
{
!
[
info exists version
]}
{
set version test
}
puts $version
puts $version
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment