[MERGE] revert deletes files when it is safe

John Arbash Meinel john at arbash-meinel.com
Wed Sep 27 22:04:43 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> Aaron Bentley wrote:
>>>
>>>> John Arbash Meinel wrote:
>>> What would you prefer?
> 
> I would prefer self.change_file_contents(path, new_contents)

What about 'set_file_contents'?

Though it would be nice if there were a simple way to do it to multiple
files.

"change" assumes it already exists
"set" can work if it exists or not.

> 
>>> We already have a common idiom of using
>>> 'self.build_tree([])' for creating a tree with arbitrary contents. 
> 
> Right, but
> - build_tree is not a good name when you're updating an existing tree
> - using lists is overkill when you're just trying to update one or two
>   files.
> - interpreting the list as tuples is not discoverable, and hard to
>   finger-type correctly.
> 
>>> I *think* Robert is wanting to switch the tests over to MemoryTree where
>>> possible. Which means he can change build_tree_contents() to work on a
>>> Transport, and not have to actually write to disk for lots of tests.
> 
> I'm not entirely comfortable with this kind of simulation, but I wasn't
> trying to block it.  I think we should get Martin to write a sequel for
> distcc: distunittest.

I think he was planning to only do it when the test cares more about the
branch stuff, and not the working tree. And only uses a working tree to
create revisions. Which is moderately safe IMO.

> 
>>> Though now that I realize that, I want to ask Robert to give selftest a
>>> flag to actually write to disk. As sometimes you need to do a
>>> post-mortem. Which is impossible if everything is in RAM. (Mabye the
>>> flag could be automatically set by using --keep-output).
> 
> True.
> 
> Aaron

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060927/8ebda200/attachment.pgp 


More information about the bazaar mailing list