ObjectNotLocked. What I should do?
Aaron Bentley
aaron.bentley at utoronto.ca
Wed Mar 28 20:06:24 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
=== modified file __init__.py
+ if not set and not clear:
+ raise errors.BzrCommandError(
+ 'You must supply either --set or --clear')
+ if set and clear:
+ raise errors.BzrCommandError(
+ 'You cannot supply both --set and --clear')
+ # At this point 'set' will always be the desired value. Because if
+ # 'set' is true, then the execute bit should be set, if it is
False,
+ # that means 'clear' must be True, which means the executable bit
+ # should be False.
^^ I think it would be clearer to use RegistryOption.from_kwargs:
RegistryOption.from_kwargs('executable', value_switches=True,
enum_switch=False, set="set x-bit for file",
clear="clear x-bit for file")
+ tree, relpaths = builtins.tree_files(files_list)
+ tt = None
+ tree.lock_tree_write()
+ try:
+ tt = transform.TreeTransform(tree)
TreeTransform takes out a write lock on construction, and releases it on
TreeTransform.apply or TreeTransform.finalize. So there is no need to
explicitly lock the tree.
+ for fname in relpaths:
+ absfname = tree.abspath(fname)
+
+ fid = tree.path2id(fname)
+ if fid is None:
+ self.outf.write("Path %s is not versioned"
+ % (fname,))
+ continue
Is there a point determining absfname if it's not versioned?
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGCryw0F+nu1YWqI0RAjRsAJ9YgcftJIkHDNU1RDaliwaunFoFhQCdFIMD
Yj0QHBpQ/pHz6k4jFDg2hZY=
=uiDd
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list