[MERGE] Nicer location display in info

John Arbash Meinel john at arbash-meinel.com
Fri Jul 6 20:13:44 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> Hi all,
> 
> This patch makes the branch location display nicer.
> 
> It displays local paths as paths, not URLs.  It displays paths relative
> to the current directory, if possible.
> 
> Repository branches now follow the same rules as all other branches--
> they are not displayed relative to the repository root.  This makes it
> more consistent with other branches, because otherwise it would be hard
> to understand the meaning of a branch path.
> 
> The relationship of repository branches to their parents are now
> clearer.  For example, it used to say "repository branch: child" and
> "parent branch: /repository/parent", and this did not make it clear that
> they two branches were really beside each other (in /repository/).
> 
> The push branch is now shown as "push branch", not "publish to branch".
>  The public and submit branches are now shown for the first time.  The
> order is:
> public, push, parent, submit
> (Rationale: public may be another name for the current branch, or
> another name for the push branch.  push may be another name for the
> parent branch.  submit may be another name for the parent branch)
> 
> Aaron

It would be nice if we could give 'LocationList' an self.outf.encoding, so that
people who have non-ascii branches can see nicely formatted Unicode named
locations.

One possible problem with 'relpath' is that it is a bit overeager. I believe it
is willing to take:

/foo/bar/baz
and

/biz/bang

and make one:

../../../biz/bang

I think it should recognize if it goes through the root (or maybe just has more
relative sections than actual parts?) Consider:

/srv/this/is/a/long/path/
to
/srv/another/long/path/

../../../../../another/long/path

is probably worse than
/srv/another/long/path

I think relative paths are great as long as the number of '..' is less than 2
or 3 ('../../foo' is reasonable, '../../../foo/bar' is okay, but getting hard
to understand. Any more than that seems unweildy).

Thoughts?

Otherwise I like it.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjpRoJdeBCYSNAAMRAtEIAJ9qx9pZsp+QniDmsmm7mXGStD6haACdEAbg
keWT9EibBJG31MLvS5AGmOQ=
=DU/z
-----END PGP SIGNATURE-----



More information about the bazaar mailing list