bzr bug 30159 (paths are always from root)
John O'Brien
webm0nk3y at gmail.com
Wed Jul 16 18:01:47 BST 2008
If this were my product :-)
I would be concerned about changing existing functionality of the output of
bzr status since it may have side effects impacting developers (users) who
already use/parse the output of the command. I would at a minimum add a
command switch which changes the default behavior so as not to effect these.
Let me know if this concern is relevant.
I like the helper class suggestion. IMO, this would provide better SoC than
having this functionality baked in.
On Wed, Jul 16, 2008 at 9:00 AM, John Arbash Meinel <john at arbash-meinel.com>
wrote:
> -----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-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20080716/2f7588d0/attachment.htm
More information about the bazaar
mailing list