Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-599
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Martin Bravenboer
Reporter: SIGOURE Benoit
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Stratego/XT

XTC doesn't handle duplicate entries properly

Created: 2006-07-11 11:23   Updated: 2008-03-31 20:46
Component/s: xtc
Affects Version/s: 0.18 (Standard C and Stratego Libraries)
Fix Version/s: 0.17

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
Linux warszawa 2.6.17-debian-etch-lrde-v7 #2 SMP PREEMPT Fri Jun 23 07:21:36 CEST 2006 i686 GNU/Linux
Stratego/XT 0.17M1pre15421
gcc (GCC) 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)


 Description  « Hide
XTC should not allow a tool to be registered with different version but identical path. In this case, only the latest version should be kept in the repository.
XTC should not allow a tool to be registered with identical versions but different paths. In this case, only the latest path should be kept in the repository.

Sample:
/tmp/xtc $ xtc -r repos register -l `pwd` -V 1.0 -t foobar
/tmp/xtc $ xtc -r repos query -a
foobar (1.0) : /tmp/xtc/foobar
/tmp/xtc $ xtc -r repos register -l `pwd` -V 1.1 -t foobar
/tmp/xtc $ xtc -r repos query -a
foobar (1.1) : /tmp/xtc/foobar
foobar (1.0) : /tmp/xtc/foobar
/tmp/xtc $ xtc -r repos register -l /dev/null -V 1.1 -t foobar
/tmp/xtc $ xtc -r repos query -a
foobar (1.1) : /dev/null/foobar
foobar (1.1) : /tmp/xtc/foobar
foobar (1.0) : /tmp/xtc/foobar
/tmp/xtc $ pp-aterm -i repos
[ (Repository, ["repos"])
, (Imported("repos"), [])
, ( Tool("foobar")
  , [("1.1", "/dev/null/foobar"), ("1.1", "/tmp/xtc/foobar"), ("1.0", "/tmp/xtc/foobar")]
  )
]


 All   Comments   Work Log   Change History      Sort Order:
Martin Bravenboer [2006-12-21 06:16]
Seems to be fixed:

$ xtc -r repos register -l `pwd` -V 1.0 -t foobar
$ xtc -r repos query -a
foobar (1.0) : /home/martin/tmp/xtc/foobar
$ xtc -r repos register -l `pwd` -V 1.1 -t foobar
$ xtc -r repos query -a
foobar (1.1) : /home/martin/tmp/xtc/foobar
$ xtc -r repos register -l /dev/null -V 1.1 -t foobar
$ xtc -r repos query -a
foobar (1.1) : /dev/null/foobar
$ pp-aterm -i repos
[ (Repository(), ["repos"])
, (Imported("repos"), [])
, (Tool("foobar"), [("1.1", "/dev/null/foobar")])
]
$ xtc -r repos register -l /usr -V 1.2 -t foobar
$ xtc -r repos query -a
foobar (1.2) : /usr/foobar
foobar (1.1) : /dev/null/foobar
$ pp-aterm -i repos
[ (Repository(), ["repos"])
, (Imported("repos"), [])
, (Tool("foobar"), [("1.2", "/usr/foobar"), ("1.1", "/dev/null/foobar")])
]