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”)]
)
]

Submitted on 11 July 2006 at 13:23

On 21 December 2006 at 07:16 Jira commented:

STR-599, martin:
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”)])
]

Log in to post comments