[merge][0.11] Transform._set_mode stats the wrong file

Aaron Bentley aaron.bentley at utoronto.ca
Thu Sep 21 21:24:23 BST 2006


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

John Arbash Meinel wrote:
> Attached is a patch which fixes:
> https://launchpad.net/products/bzr/+bug/56549
> 
> And includes a test case.
> 
> I'm not super happy with the test case, but it was the easiest way to
> fight my way through all the layering.

I've attached an alternative test.  What do you think?

> Perhaps Aaron was thinking that rw permissions should be preserved as
> much as possible. Though because of the bug, that wasn't really happening.

That was the reason.  I don't think changing the contents of a file
should alter its file mode.

> +            transform.create_file('bar2 contents\n', bar2_id, mode_id=bar1_id)

It's unusual to use the mode_id parameter.  The reason you see it in
revert is because revert's backups should have the same mode as the new
contents.  So I'd rather see delete_contents(bar1_id),
create_contents(bar1_id.)

But +1.  Do whatever you think is right wrt the test cases.  Keep one,
or both, if you like.

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

iD8DBQFFEvT30F+nu1YWqI0RAtMxAJ9rOdpc3c1L5XtSFBfcE1ESJ54DlgCfTjYY
eaAMUffa54doQZWQKsd/Cdc=
=ZwVw
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preserve-mode-test.patch
Type: text/x-patch
Size: 9668 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060921/13755b43/attachment.bin 


More information about the bazaar mailing list