Discussion:
Path Separators
(too old to reply)
Clark Christensen
2009-12-18 17:36:43 UTC
Permalink
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly really happy with it. But the one thing that causes me the most problems is the forward slash path separator in the output from many fossil commands.

I often find myself using "fossil status", then wanting to copy/paste a path/to/file from the output into the next command, perhaps "fossil gdiff". Obviously, on Windows, this fails. And it's a hassle to have to edit the path separators every time.

How do other Win/Fossil users handle this?

Would it make sense to change Fossil to output backslashes as the path separator on Windows platforms (path\to\file)?

Has this already been discussed?

Thanks!

-Clark
Daniel Clark
2009-12-18 18:10:55 UTC
Permalink
Post by Clark Christensen
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly really happy with it. But the one thing that causes me the most problems is the forward slash path separator in the output from many fossil commands.
I often find myself using "fossil status", then wanting to copy/paste a path/to/file from the output into the next command, perhaps "fossil gdiff". Obviously, on Windows, this fails. And it's a hassle to have to edit the path separators every time.
How do other Win/Fossil users handle this?
Would it make sense to change Fossil to output backslashes as the path separator on Windows platforms (path\to\file)?
Has this already been discussed?
Thanks!
-Clark
Easy workaround unless/until fossil is changed would be to use the
http://www.cygwin.com/ bash shell.
--
Daniel JB Clark | Sys Admin, Free Software Foundation
pobox.com/~dclark | http://www.fsf.org/about/staff#danny
Emil Totev
2009-12-19 16:02:00 UTC
Permalink
---------- Forwarded message ----------
Date: Fri, 18 Dec 2009 09:36:43 -0800 (PST)
Subject: [fossil-users] Path Separators
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly really happy with it.  But the one thing that causes me the most problems is the forward slash path separator in the output from many fossil commands.
I often find myself using "fossil status", then wanting to copy/paste a path/to/file from the output into the next command, perhaps "fossil gdiff".  Obviously, on Windows, this fails.  And it's a hassle to have to edit the path separators every time.
How do other Win/Fossil users handle this?
Would it make sense to change Fossil to output backslashes as the path separator on Windows platforms (path\to\file)?
Has this already been discussed?
Thanks!
 -Clark
I was also trying to use fossil under TCC, but I had problems with the
space in the default COMSPEC location (c:\Programs Files... etc).

Finally I gave up and now I have an alias
FOSS=CMD /C D:\PROGRAMS\UTILS\FOSSIL.EXE

This seems to work OK (I'm a quite basic fossil user yet though).
I would be happy if fossil were made to work better under TCC and am
willing to help with testing and suggestions (no coding in C).

Emil
Michael Richter
2009-12-20 14:02:57 UTC
Permalink
The easiest immediate solution for you is to type "OPTION" at the TCC
command line and tell TCC to allow both forward and back slashes in file
names. CMD.EXE users have a bigger problem.
Post by Clark Christensen
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly
really happy with it. But the one thing that causes me the most problems is
the forward slash path separator in the output from many fossil commands.
I often find myself using "fossil status", then wanting to copy/paste a
path/to/file from the output into the next command, perhaps "fossil gdiff".
Obviously, on Windows, this fails. And it's a hassle to have to edit the
path separators every time.
How do other Win/Fossil users handle this?
Would it make sense to change Fossil to output backslashes as the path
separator on Windows platforms (path\to\file)?
Has this already been discussed?
Thanks!
-Clark
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Clark Christensen
2009-12-20 16:36:32 UTC
Permalink
Good suggestion, Michael. That's always part of my TCC setup, and it's fine. The "fossil gdiff" example wasn't applicable (sorry). That just works.

It's other commands/apps, like "copy path/to/file ..." and "dir path/to/file". Those throw "invalid option" errors.

My projects are not C or other compiled stuff where I might build from the repository. Mine is mostly Perl, Javascript, and HTML files. I typically finish work, commit, then copy the changed files to a staging/test server. Or I finish work, and copy a subset of files, leaving the commit for a later time. It would be handy to copy/paste those names from the "fossil status" output.

-Clark




________________________________
From: Michael Richter <***@gmail.com>
To: fossil-***@lists.fossil-scm.org
Sent: Sun, December 20, 2009 6:02:57 AM
Subject: Re: [fossil-users] Path Separators

The easiest immediate solution for you is to type "OPTION" at the TCC command line and tell TCC to allow both forward and back slashes in file names. CMD.EXE users have a bigger problem.
Post by Clark Christensen
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly really happy with it. But the one thing that causes me the most problems is the forward slash path separator in the output from many fossil commands.
Post by Clark Christensen
I often find myself using "fossil status", then wanting to copy/paste a path/to/file from the output into the next command, perhaps "fossil gdiff". Obviously, on Windows, this fails. And it's a hassle to have to edit the path separators every time.
How do other Win/Fossil users handle this?
Would it make sense to change Fossil to output backslashes as the path separator on Windows platforms (path\to\file)?
Has this already been discussed?
Thanks!
-Clark
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Michael Richter
2009-12-21 02:30:02 UTC
Permalink
Oh, that's a limitation of the TCC parser because it doesn't know when
you're using a switch or a path. Wrap the file names in quotation marks and
it works fine.

So instead of *dir path/to/file* you'd have *dir "path/to/file"*. (I tested
this just now to make sure my memory wasn't flawed.) If you're doing Perl
stuff, it'll be a trivial one-liner script to take the *fossil
status*output and wrap quotation marks as needed.

This doesn't mean that Fossil shouldn't be modified to report file names
according to local OS file conventions, of course. It is a quick workaround
for you, however.
Post by Clark Christensen
Good suggestion, Michael. That's always part of my TCC setup, and it's
fine. The "fossil gdiff" example wasn't applicable (sorry). That just
works.
It's other commands/apps, like "copy path/to/file ..." and "dir
path/to/file". Those throw "invalid option" errors.
My projects are not C or other compiled stuff where I might build from the
repository. Mine is mostly Perl, Javascript, and HTML files. I typically
finish work, commit, then copy the changed files to a staging/test server.
Or I finish work, and copy a subset of files, leaving the commit for a later
time. It would be handy to copy/paste those names from the "fossil status"
output.
-Clark
------------------------------
*Sent:* Sun, December 20, 2009 6:02:57 AM
*Subject:* Re: [fossil-users] Path Separators
The easiest immediate solution for you is to type "OPTION" at the TCC
command line and tell TCC to allow both forward and back slashes in file
names. CMD.EXE users have a bigger problem.
Post by Clark Christensen
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly
really happy with it. But the one thing that causes me the most problems is
the forward slash path separator in the output from many fossil commands.
I often find myself using "fossil status", then wanting to copy/paste a
path/to/file from the output into the next command, perhaps "fossil gdiff".
Obviously, on Windows, this fails. And it's a hassle to have to edit the
path separators every time.
How do other Win/Fossil users handle this?
Would it make sense to change Fossil to output backslashes as the path
separator on Windows platforms (path\to\file)?
Has this already been discussed?
Thanks!
-Clark
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Clark Christensen
2009-12-21 19:14:35 UTC
Permalink
OK, great. I hadn't considered using quotes. I confirm your successful results with the quotes.

I modified the Fossil source for checkin.c to emit backslashes rather than forward slashes under Windows, but in use, I'm not entirely sure it's what I want - or what it might break. I'll need to use it for a while to see.

The quotes might just be a simpler solution. Just something else to learn :-))

Thanks!

-Clark




________________________________
From: Michael Richter <***@gmail.com>
To: fossil-***@lists.fossil-scm.org
Sent: Sun, December 20, 2009 6:30:02 PM
Subject: Re: [fossil-users] Path Separators

Oh, that's a limitation of the TCC parser because it doesn't know when you're using a switch or a path. Wrap the file names in quotation marks and it works fine.

So instead of dir path/to/file you'd have dir "path/to/file". (I tested this just now to make sure my memory wasn't flawed.) If you're doing Perl stuff, it'll be a trivial one-liner script to take the fossil status output and wrap quotation marks as needed.

This doesn't mean that Fossil shouldn't be modified to report file names according to local OS file conventions, of course. It is a quick workaround for you, however.



2009/12/21 Clark Christensen <***@yahoo.com>

Good suggestion, Michael. That's always part of my TCC setup, and it's fine. The "fossil gdiff" example wasn't applicable (sorry). That just works.
Post by Clark Christensen
It's other commands/apps, like "copy path/to/file ..." and "dir path/to/file". Those throw "invalid option" errors.
My projects are not C or other compiled stuff where I might build from the repository. Mine is mostly Perl, Javascript, and HTML files. I typically finish work, commit, then copy the changed files to a staging/test server. Or I finish work, and copy a subset of files, leaving the commit for a later time. It would be handy to copy/paste those names from the "fossil status" output.
-Clark
________________________________
Post by Clark Christensen
Sent: Sun, December 20, 2009 6:02:57 AM
Subject: Re: [fossil-users] Path Separators
Post by Clark Christensen
The easiest immediate solution for you is to type "OPTION" at the TCC command line and tell TCC to allow both forward and back slashes in file names. CMD.EXE users have a bigger problem.
I'm using Fossil on MS Windows under the TCC/4NT shell, and am mostly really happy with it. But the one thing that causes me the most problems is the forward slash path separator in the output from many fossil commands.
Post by Clark Christensen
I often find myself using "fossil status", then wanting to copy/paste a path/to/file from the output into the next command, perhaps "fossil gdiff". Obviously, on Windows, this fails. And it's a hassle to have to edit the path separators every time.
How do other Win/Fossil users handle this?
Would it make sense to change Fossil to output backslashes as the path separator on Windows platforms (path\to\file)?
Has this already been discussed?
Thanks!
-Clark
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
Post by Clark Christensen
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Continue reading on narkive:
Loading...