~abentley/bzrtools/bzrtools.dev

  • Committer: ghigo
  • Date: 2006-03-13 20:19:41 UTC
  • Revision ID: ghigo@venice-20060313201941-1322dc5ba24517d6
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
Filename Latest Rev Last Changed Committer Comment Size
..
.be 49 19 years ago Aaron Bentley Added bug report Diff
debian 75 19 years ago Jeff Bailey Add Debian directory Diff
obsolete 63 19 years ago Aaron Bentley Added NEWS, obsoleted bzr-pull Diff
patches 284 19 years ago Aaron Bentley Added patch for tab-in-patch-filename support Diff
testdata 85 19 years ago Aaron Bentley Added annotate plugin Diff
.bzrignore 246 19 years ago Aaron Bentley Merged shelf_v2 131 bytes Diff Download File
__init__.py 321.2.1 18 years ago ghigo add support for bazaar diff 8.7 KB Diff Download File
baz_import.py 286.1.1 19 years ago Aaron Bentley Updates to match API changes 19.9 KB Diff Download File
blackbox.py 310 19 years ago Aaron Bentley Fixed fetch-ghosts 2.2 KB Diff Download File
branchhistory.py 308 19 years ago Aaron Bentley got branch-history under test 1.8 KB Diff Download File
bzrtools.py 321 18 years ago Aaron Bentley Only use the decorated push if it's likely to work 9.3 KB Diff Download File
clean_tree.py 313 18 years ago Aaron Bentley Updated to match API changes 4 KB Diff Download File
COPYING 14 19 years ago abentley GPLed the project, ignored files 17.5 KB Diff Download File
CREDITS 280 19 years ago Aaron Bentley Added Daniel Silverstone to credits 190 bytes Diff Download File
diffstat.py 296.1.3 19 years ago Dafydd Harries Fix typo (s/changes/changed/). 2.6 KB Diff Download File
dotgraph.py 312 18 years ago Aaron Bentley forced ancestry graph to use utf-8 Dot output 8.5 KB Diff Download File
errors.py 271 19 years ago Aaron Bentley Cherry-picked Robert's diff and push fixes 911 bytes Diff Download File
fetch_ghosts.py 317 18 years ago Aaron Bentley Fixed fetching code to use Branch.fetch 3 KB Diff Download File
graph.py 317 18 years ago Aaron Bentley Fixed fetching code to use Branch.fetch 10 KB Diff Download File
hunk_selector.py 0.1.18 19 years ago Michael Ellerman Split out HunkSelector class. 5.9 KB Diff Download File
INSTALL 304 19 years ago Aaron Bentley Documentation updates 943 bytes Diff Download File
NEWS 305 19 years ago Aaron Bentley Updated NEWS 2 KB Diff Download File
patch.py 321.2.4 18 years ago ghigo Use the TreeTransform class, on the basis of the s 7.7 KB Diff Download File
patches.py 0.1.17 19 years ago Michael Ellerman Upated patches.py to version from bzrtools-0.1.1 18.1 KB Diff Download File
progress.py 102 19 years ago Aaron Bentley Got baz2bzr/annotate working now that ProgressBar 1.5 KB Diff Download File
push.py 319 18 years ago Aaron Bentley Update to new run_argv_aliases API 2.3 KB Diff Download File
README 300 19 years ago Aaron Bentley Updated docs 1.6 KB Diff Download File
reweave_inventory.py 286.1.1 19 years ago Aaron Bentley Updates to match API changes 2.8 KB Diff Download File
File setup.py 266 19 years ago Aaron Bentley 0.6.1 release 428 bytes Diff Download File
shelf.py 320 18 years ago Aaron Bentley Updated to match new bzr diff behaviour 3.9 KB Diff Download File
shelf_tests.py 320 18 years ago Aaron Bentley Updated to match new bzr diff behaviour 5 KB Diff Download File
shell.py 313 18 years ago Aaron Bentley Updated to match API changes 8.8 KB Diff Download File
terminal.py 249 19 years ago Aaron Bentley Got the shell basics working properly 2.1 KB Diff Download File
File test.py 301 19 years ago Aaron Bentley Avoided leaving junk all over the place when runni 909 bytes Diff Download File