321.2.5
|
|
|
ghigo |
18 years ago
|
|
|
321.2.4
|
|
Use the TreeTransform class, on the basis of the suggest of Aaron Bentley
---------------------------------------
Goffredo Baroncelli wrote: | On Monday 13 March 2006 01:36, Aaron Bentley wrote: | |>Hi Goffredo, | | | Hi Aaron, | | |>I'm still waiting for your thoughts on this. As I said, I'm willing to |>merge it, given that it's optional. On the other hand, there are |>situations where it will lead to data loss, so using TreeTransform may |>be a better approach. | | | I updated the patch in order to solve some concerns. But you are right, I | have to use the TreeTransform class. My big problem is the lack of | documentation on how use the class: could you answer to some my question ?
Sure. Any failings in the documentation are my fault.
| The TreeTransform class is instantiated on the working tree: but how we | inform the class that a file is: | - changed ( updated )
Get the trans_id with trans_id_tree_file_id Delete the current contents with delete_contents Add new contents with create_file (or symlink, directory)
| - created
Call new_file
| - deleted
Get the trans_id with trans_id_tree_file_id Delete the current contents with delete_versioned
| - renamed/moved ( is it the same ? )
Get the trans_id with trans_id_tree_file_id Call adjust_path
| Then how we can manage the conflict ?
If you create a filesystem conflict, the transform won't apply. If you call resolve_conflicts, it will fix filesystem conflicts, so the transform will apply.
Text conflicts are up to you to manage.
| Reading the code, what I understood is that: | - for every file touched, It must assign a trans_id using the function create_path( )
create_path is only for new files. For existing files, you should get them from trans_id_tree_file_id, trans_id_tree_path, or trans_id_file_id.
| - the creation of a file/directory/symlink is perfomed via the create_{directory,symlink,file) | function
You can, but there are also the new_file, new_directory, new_symlink convenience methods.
| - the deletion of a file ( directory, symlink ? ) is scheduled by the | unversion_file/delete_contents depending if a file is versioned.
For a versioned file, you'd have to do both. Or, you can use delete_versioned_file.
| - the renaming of a directory/file/symlink is perfomed by the adjust_path function
Right.
| - I dont understood how we manage the content change
Content changes are content deletion and content creation.
Aaron
|
ghigo |
18 years ago
|
|
|
321.2.3
|
|
|
ghigo |
18 years ago
|
|
|
321.2.2
|
|
|
ghigo |
18 years ago
|
|
|
321.2.1
|
|
|
ghigo |
18 years ago
|
|
|
321
|
|
|
Aaron Bentley |
18 years ago
|
|
|
320
|
|
|
Aaron Bentley |
18 years ago
|
|
|
319
|
|
|
Aaron Bentley |
18 years ago
|
|
|
318
|
|
|
Aaron Bentley |
18 years ago
|
|
|
317
|
|
|
Aaron Bentley |
18 years ago
|
|
|
316
|
|
|
Aaron Bentley |
18 years ago
|
|
|
315
|
|
|
Aaron Bentley |
18 years ago
|
|
|
314
|
|
|
Aaron Bentley |
18 years ago
|
|
|
313
|
|
|
Aaron Bentley |
18 years ago
|
|
|
312
|
|
|
Aaron Bentley |
18 years ago
|
|
|
311
|
|
|
Aaron Bentley |
18 years ago
|
|
|
310
|
|
|
Aaron Bentley |
18 years ago
|
|
|
309
|
|
|
Aaron Bentley |
18 years ago
|
|
|
308
|
|
|
Aaron Bentley |
18 years ago
|
|
|
307
|
|
|
Aaron Bentley |
18 years ago
|
|
|