bzr bug 30159 (paths are always from root)
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 16 14:00:41 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alaa Salman wrote:
| Martin Pool wrote:
| | Yes, it still needs to be worked on and I don't think any requirements
| | have changed, but it would be worth making sure people agree with the
| | way you're going to approach it.
| |
| | I think by default, we should show changes across the whole tree, but
| | relative to your cwd. So if I'm in bzrlib I might get
| |
| | modified:
| | ../doc/index.txt
| | bzrdir.py
| |
| | then if I want to see changes on only the subtree I should ask for
| | that. This is consistent with bzr versioning the whole tree
| | atomically and commit working across the whole tree by default. At
| | any rate I think making this change is useful orthogonal to possibly
| | working only from the cwd down.
|
| I think this is brilliant. This bug is really annoying. I once tried to
| fix it, but i found it to be too involved and so not as easy a fix as i
| had thought.
|
| If i remember correctly, the reason i gave up was that the working tree
| dealt with full paths in everything it did. So the function that prints
| the status simply spits out the paths that the WT has told it has
| changes. Or something along those lines. Thinking about it now, i could
| have just used the cwd and the full path to just print the proper path
| without messing with the bzrlib api.
|
|
| Oh well...
|
Note, that you can do some interesting stuff with bzr status, like:
bzr init branch
echo foo > branch/file
bzr add branch
bzr status branch
bzr commit branch/file -m 'file'
bzr log branch/file
Note that all of these work, and in none of those cases is CWD
underneath the Branch.
I don't know if you want "bzr status branch/"
to print:
modified:
~ branch/file
But it certainly sounds like that is what you want.
I would probably write a helper class that looks at 'tree.basedir'
versus 'osutils.getcwd()' (I would use those specifically, because they
are both Unicode paths with '/' as the path separator.)
Then it can know about portions that always need to be added, and how
many subdirs cwd is in, etc.
It probably needs *some* performance tuning, but other than 'first
commit', you don't generally see a large portion of your tree changed,
so it doesn't have to be super fast.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkh98PgACgkQJdeBCYSNAAP5BwCeO/lBNfalyRrP1Tkuuxvz4z2j
Eu4AoKGbcSQyyIeHrrv35ZcAlcpSR8mn
=kSdf
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list