The following snippet of code implements the _editEntries method for the Aegis target repository I'm workin on.
While it's similar to the _addEntries implementation it raise the
exception pasted below. Can someone help?
It's possible that the problem is in my poor knowledge of python :-)
------------------------------------------------------------------------
def _editEntries(self, names):
[self.__copy_file(name) for name in names]
def __copy_file(self, file_name):
cmd = self.repository.command("-copy", "-keep",
"-project", self.repository.module,
"-change", self.change_number, file_name)
copy_file = ExternalCommand(cwd=self.repository.basedir,
command=cmd)
output = copy_file.execute(stdout = PIPE, stderr = STDOUT)[0]
if copy_file.exit_status > 0:
raise ChangesetApplicationFailure(
"%s returned status %d, saying: %s" %
(str(copy_file), copy_file.exit_status, output.read()))
------------------------------------------------------------------------
------------------------------------------------------------------------
Date: 2008-05-23 08:04:58+00:00
Author: Nobody
Entries: foo.txt(UPD)
Log:
Traceback (most recent call last):
File "/home/walter/src/tailor-upstream/vcpx/target.py", line 130, in
replayChangeset
self._replayChangeset(changeset)
File "/home/walter/src/tailor-upstream/vcpx/target.py", line 333, in
_replayChangeset
action(group)
File "/home/walter/src/tailor-upstream/vcpx/repository/aegis/target.py", line
116, in _editEntries
[self.__copy_file(name) for name in names]
File "/home/walter/src/tailor-upstream/vcpx/repository/aegis/target.py", line
222, in __copy_file
output = copy_file.execute(stdout = PIPE, stderr = STDOUT)[0]
File "/home/walter/src/tailor-upstream/vcpx/shwrap.py", line 159, in execute
return self._execute(allargs, **kwargs)
File "/home/walter/src/tailor-upstream/vcpx/shwrap.py", line 202, in _execute
self._last_command = [chunk % kwargs for chunk in self.command]
TypeError: unsupported operand type(s) for %: 'ChangesetEntry' and 'dict'
10:05:02 [E] Couldn't replay changeset
------------------------------------------------------------------------
--
Walter Franzini
http://aegis.stepbuild.org/
PGP Public key ID: 1024D/CB3FEB43
Key fingerprint : FA26 C33B CAFF 7848 EFEB 7327 96AA 2D57 CB3F EB43
Key server : http://www.keyserver.net
pgpINw5X2MnMN.pgp
Description: PGP signature
_______________________________________________ Tailor mailing list [email protected] http://lists.zooko.com/mailman/listinfo/tailor
