Q: how to change path separator in command output?
John Arbash Meinel
john at arbash-meinel.com
Mon Aug 4 13:42:21 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
| On Sat, 2008-08-02 at 09:28 -0700, C. Mundi wrote:
|> Hi. New user question.
|>
|> I've just skimmed the users guide and started playing with bzr 1.6b3
|> on a pair of Linux and WinXP boxes.
|>
|> I'm already thinking about ways to integrate bzr into our build
|> process, so...
|>
|> Paths in command output use the solidus (i.e., /) for path separators
|> in console output both on Windows and Linux.
|>
|> I might have expected that bzr would use Python's os.sep.which would
|> give a reverse solidus on Windows, but apparently not. There must be
|> a good reason for this, though I did not find a clear one in the gmane
|> archives.
|>
|> Is there a way to control the path-separator behavior, or is there a
|> reason I would not want to? I'm just starting to think about this, as
|> you can tell.
|
| We normalise all paths at entrance to bzr and use / thereafter; I think
| we accept \ on windows; I *thought* we did write \ on output there but
| perhaps I'm mistaken - unless you are running with cygwin's python
| perhaps?
|
| -Rob
We accept '\' as an input character, but always emit '/' (regardless
cygwin or win32). We talked about it a *long* time ago. Like 2-3 years.
I think we were considering making "self.outf" (essentially) something
richer than a File object, so you could say "write_path()" or
"write_url()", etc.
The reason we went with "/" is because it is accepted by almost every
windows command (dir being a notable exception) and it simplified things
internally.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiW+S0ACgkQJdeBCYSNAAPUVgCeLXXsghUOGNGkM7Kpl1Yzi63F
6b0An2pV7yGndzIrXi0A3RX1xYMg71l8
=RjQq
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list