[MERGE] enhanced mv command

John Arbash Meinel john at arbash-meinel.com
Thu Jan 18 15:14:08 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marius Kruger wrote:
> hi,

I tried to submit this to BB, but it was giving me a 500 Internal Error.
(I assume it doesn't like something about the text)


Aaron has said he will clean up the rest, so conditional +1.

But I would like to comment on the "FilesExist" class. It currently
1) Has no test for formatting in bzrlib/tests/test_errors.py
2) Has only 1 caller who always passes 2 files, in fact, the error
itself is plural, which indicates it is meant to be thrown to indicate
multiple files exist.
3) It really isn't a generic error. It is an error indicating that both
the source and target files exist when trying to do a rename. So I would
rather it was an explicitly specific error, rather than dealing with
"File(s)" exist, ...

So I would probably be happier with something like:

class RenameFailedFilesExist(BzrError):
  """Used when renaming and both source and dest exist."""

  _fmt = ("Could not rename %(source)s to %(dest)s both files exist."
          "%(extra)s")

  def __init__(self, source, dest, extra=None):
    ...


John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFr47AJdeBCYSNAAMRAgm5AJ9/ClDCtW/T+PTkancO2EQl498SKQCg0PfG
7nMFk8x+d5Z1krsfKdGMiWo=
=4r77
-----END PGP SIGNATURE-----



More information about the bazaar mailing list