[fossil-users] comparison with Git

2012-09-13 Thread Russ Paielli
I recall reading somewhere (can't seem to find it at the moment) that
fossil is a serverless, zero-administration program. Is that true of git
also? Thanks.

--Russ P.

-- 
http://RussP.us
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] comparison with Git

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 00:13:43 -0700
Russ Paielli russ.paie...@gmail.com wrote:

 I recall reading somewhere (can't seem to find it at the moment) that
 fossil is a serverless, zero-administration program. Is that true
 of git also? Thanks.

Depends on how you define serverless.
Any distributed SCM (Fossil and Git included) is specifically designed
to keep all the repository history on a local machine, so if by
serverless you mean that an SCM do not need to contact a server to
record a commit (or fetch history log or whatever else) then yes, both
Fossil and Git are serverless, and so does every other DVCS out there.

As to zero-administration, this sounds more like a flame bite rather
than a technical consideration: any DVCS system requires certain amount
of administration around it.  This might possibly refer to the fact
Fossil is self-hosting -- you can transfer its binary to a machine, run
it and it will serve the specified repository (or a set of them) all by
itself as it includes a built-in web-server which is used for both web
UI and data pushes/pulls.

The real aspect in which Fossil shines, is that it provides a turn-key
*integrated* solution consisting of an SCM (obviously), wiki, bug
tracker, project documentation editing, and user database with access
controls, all accessible/configurable via web UI, and all that is
provided by a single 1.2M binary which only depends on libc, zlib and
openssl (optionally).  This really rocks for certain applications.

You could read this classical post by Zed Shaw [1] explaining it all.

1. http://sheddingbikes.com/posts/1276624594.html
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] comparison with Git

2012-09-13 Thread Richard Hipp
On Thu, Sep 13, 2012 at 3:13 AM, Russ Paielli russ.paie...@gmail.comwrote:

 I recall reading somewhere (can't seem to find it at the moment) that
 fossil is a serverless, zero-administration program. Is that true of git
 also? Thanks.


We make that claim about the SQLite database engine.  See

http://www.sqlite.org/about.html

Fossil is the DVCS used to manages the SQLite sources, and Fossil is built
on top of SQLite.  The homepages for Fossil and SQLite are hosted on the
same machine.  But Fossil and SQLite are not the same thing.



 --Russ P.

 --
 http://RussP.us

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Tommaso D'Argenio
Hi,

I'm quite new to fossil and have some experience only with subversion. I've
setup a little test system to check out if I can implement fossil into our
workflow.

I've a windows 2003 server where I've created a repository folder and I've
have all the development files in a separate folder on the same machine

e:\fossil\repo  this is the repository folder, which contains:

13/09/2012  12:2170,656 apptest.fossil

e:\web\apptest  this is the development folder, which contains:

05/09/2012  13:0146 thisisatest.txt
05/09/2012  13:01 9,216 _FOSSIL_

The server is running as a service with the following parameters:
e:\fossil\fossil.exe server --port 91 e:\fossil\repo\apptest.fossil

so I'm not using it as CGI on IIS or Apache, but using its own internal web
server.

On my client machine I've created a folder on the desktop called
apptest_local and from command shell I've cloned and downloaded the
repository,
so far so good and I had not problem whatsoever. I've then edited the local
thisisatest.txt file and commited to the server, this also has worked as
expected.
I've made few commitments and also simulated another user to check out how
merge conflicts are handled... so all in all everything went smoothly.

The web server respond with no issues from the client machine and I can
clearly see the timeline with all the commits and comments etc.

Problem is that once I go on the server, while the repository file is
updated (check date/time above) the actual text file in the development
folder
is untouched and still the original version when it was created in the
first place.

Now I'm sure I'm doing something wrong, but what? I've tried to search in
google and on the mailing list but with no success.

Anybody can shed some light?

Thanks
Cheers
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Richard Hipp
On Thu, Sep 13, 2012 at 8:28 AM, Tommaso D'Argenio ping...@gmail.comwrote:

 Problem is that once I go on the server, while the repository file is
 updated (check date/time above) the actual text file in the development
 folder
 is untouched and still the original version when it was created in the
 first place.


The development folder on the server is no different from one of the
development folders on the client.  (Fossil doesn't know that one machine
is a client and another is a server.  They are all just computers.)  If
user Alice checks in a change out of her development folder, you wouldn't
expect user Bob's development folder to be automatically updated, would
you?  Bob needs to request that update (using fossil update).  In the
same way, you need to run fossil update on the development folder on the
server, since that development folder is just another user, as far as
Fossil is concerned.


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Tommaso D'Argenio
Hi Richard,

thanks for your fast response.

I got that, but then there is something I don't quite understand.

In a normal scenario I would have a development server (call it remote
machine), on which I have one repository for each of the application the
team develops. Each repository have multiple branches like: testing, uat,
development, production etc. So that the development team can work on the
development of the application without touching the production and so on.

Now think at this as a web development team, so we have a web application
which doesn't need to be build or anything like that. The dev team create a
new patch on their local repository and commit it to the remote testing
branch. When they open up the browser to test it out, they won't be able to
do it because the actual file in the remote repository it's the old one.
The dev guy doesn't have the permission to log on the remote machine and
manually run a fossil update, neither I can think of a process on the
remote machine that run the fossil update command every second.

For instance, I have a repository with SVN on the remote machine. I make
some changes on my local repository (after the update done locally to
incorporate changes made by other), and using TortoiseSVN I commit the
changes and solve eventual conflicts with a merge. When this is done, I
open up the web app on the browser and there it is my change.

Am I making any sense ?

thanks :)



On 13 September 2012 13:34, Richard Hipp d...@sqlite.org wrote:



 On Thu, Sep 13, 2012 at 8:28 AM, Tommaso D'Argenio ping...@gmail.comwrote:

 Problem is that once I go on the server, while the repository file is
 updated (check date/time above) the actual text file in the development
 folder
 is untouched and still the original version when it was created in the
 first place.


 The development folder on the server is no different from one of the
 development folders on the client.  (Fossil doesn't know that one machine
 is a client and another is a server.  They are all just computers.)  If
 user Alice checks in a change out of her development folder, you wouldn't
 expect user Bob's development folder to be automatically updated, would
 you?  Bob needs to request that update (using fossil update).  In the
 same way, you need to run fossil update on the development folder on the
 server, since that development folder is just another user, as far as
 Fossil is concerned.


 --
 D. Richard Hipp
 d...@sqlite.org

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
*Cheers,*
*Tommaso.*
*---*

*Imagination is more important than knowledge. A.Einstein*
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Petr Man
Hello Tommaso,

 For instance, I have a repository with SVN on the remote machine. I make
 some changes on my local repository (after the update done locally to
 incorporate changes made by other), and using TortoiseSVN I commit the
 changes and solve eventual conflicts with a merge. When this is done, I open
 up the web app on the browser and there it is my change.

The fundamental difference between SVN and Fossil is that the
repository on your server is the apptest.fossil file and not what
you have in e:\web\apptest. That folder is only a checkout of the
repository, so obviously it does not change, as Richard wrote you
already.
What you seem to be looking for is a commit hook to deploy your app
after every commit.

Petr
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 14:20:12 +0100
Tommaso D'Argenio ping...@gmail.com wrote:

[...]
 Now think at this as a web development team, so we have a web
 application which doesn't need to be build or anything like that. The
 dev team create a new patch on their local repository and commit it
 to the remote testing branch. When they open up the browser to test
 it out, they won't be able to do it because the actual file in the
 remote repository it's the old one. The dev guy doesn't have the
 permission to log on the remote machine and manually run a fossil
 update, neither I can think of a process on the remote machine that
 run the fossil update command every second.
 
 For instance, I have a repository with SVN on the remote machine. I
 make some changes on my local repository (after the update done
 locally to incorporate changes made by other), and using TortoiseSVN
 I commit the changes and solve eventual conflicts with a merge. When
 this is done, I open up the web app on the browser and there it is my
 change.
 
 Am I making any sense ?

Not much: a Subversion repository on a server does not have an open
checkout attached to it at all.  So could you please describe in more
details what you're trying to achieve?

So far it seems you want to somehow automagically update certain open
checkout of a Fossil repository after you push new changes to a
specific branch in that repository.  Is this true?

Then how precisely this is implemented in your Subversion setup?
I, for one, cannot really imagine this.

Note that a Fossil repository can have any number of open checkouts
active at the same time, all of them independent from each other.
This should hint you at that Fossil kind of work backwards here: open
checkouts refer to the repository, not the other way round.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Tommaso D'Argenio
Hi,

I don't maintain the SVN server so I can't comment on the way it's
configured.

My workflow is quite simple:
-Create a folder on my laptop
-Right click on the folder  Tortoise  Checkout and enter the repository
URL
-at this point all files get downloaded
-modify few things
-Right click on the folder  Tortoise  Commit and enter comment
-Resolve conflicts (eventually)
-Done, new files and update files on the server

When I have to work on the same repository, I just start with an Update and
then follow the rest of the workflow.

As Petr was saying, when I commit I want to see the file/s updated on the
server (remote machine) also.
How would you otherwise work on a project/software as a developer (client)
with no means to access the server
and launch an update from there ?

I want to modify my local files, commit to the test server and ask other
people to look at the changes. If they don't like it I can
revert back to the previous version otherwise if they confirm I'll make the
same commit to the production branch.

By the way I've also checked the autosync setting and it is set to ON, on
both machines. Reading from the documentation

Fossil has two modes of operation: *autosync* and *manual-merge* Autosync
mode is reminiscent of CVS or SVN in that it automatically keeps your
changes in synchronization with your co-workers through the use of a
central server.

and the autosync workflow it's what I need, but somehow doesn't work. I
pretty much did what's written here:
http://www.fossil-scm.org/xfer/doc/trunk/www/concepts.wiki.


Thanks.


On 13 September 2012 14:43, Konstantin Khomoutov 
flatw...@users.sourceforge.net wrote:

 On Thu, 13 Sep 2012 14:20:12 +0100
 Tommaso D'Argenio ping...@gmail.com wrote:

 [...]
  Now think at this as a web development team, so we have a web
  application which doesn't need to be build or anything like that. The
  dev team create a new patch on their local repository and commit it
  to the remote testing branch. When they open up the browser to test
  it out, they won't be able to do it because the actual file in the
  remote repository it's the old one. The dev guy doesn't have the
  permission to log on the remote machine and manually run a fossil
  update, neither I can think of a process on the remote machine that
  run the fossil update command every second.
 
  For instance, I have a repository with SVN on the remote machine. I
  make some changes on my local repository (after the update done
  locally to incorporate changes made by other), and using TortoiseSVN
  I commit the changes and solve eventual conflicts with a merge. When
  this is done, I open up the web app on the browser and there it is my
  change.
 
  Am I making any sense ?

 Not much: a Subversion repository on a server does not have an open
 checkout attached to it at all.  So could you please describe in more
 details what you're trying to achieve?

 So far it seems you want to somehow automagically update certain open
 checkout of a Fossil repository after you push new changes to a
 specific branch in that repository.  Is this true?

 Then how precisely this is implemented in your Subversion setup?
 I, for one, cannot really imagine this.

 Note that a Fossil repository can have any number of open checkouts
 active at the same time, all of them independent from each other.
 This should hint you at that Fossil kind of work backwards here: open
 checkouts refer to the repository, not the other way round.




-- 
*Cheers,*
*Tommaso.*
*---*

*Imagination is more important than knowledge. A.Einstein*
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Richard Hipp
On Thu, Sep 13, 2012 at 9:20 AM, Tommaso D'Argenio ping...@gmail.comwrote:

  The dev guy doesn't have the permission to log on the remote machine and
 manually run a fossil update, neither I can think of a process on the
 remote machine that run the fossil update command every second.


If it were me, I'd add a CGI script (or the equivalent) to the website
someplace where the dev guy could go and login and press a button and the
script would then automatically run fossil update.

If you wanted to be really fancy, you could allow the dev guy to enter a
specific version to update to, then have the script run fossil update
$VERSION.  That way, the dev guy could load any historical version of the
website he wanted to look at.

---

If your website is just static content, then you can use Fossil's embedded
documentation feature.  See

http://www.fossil-scm.org/fossil/doc/trunk/www/embeddeddoc.wiki

Notice the trunk term in the URL above.  You can change that to a version
name of any kind, including a ISO8601 date in order to see historical
copies of the document.  For example, this is what the Fossil homepage
looked like on 2011-01-01:

http://www.fossil-scm.org/fossil/doc/2011-01-01/www/index.wiki

But the embedded documentation feature will only help you if you are
serving static content directly from the Fossil engine itself.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Support for Win9x?

2012-09-13 Thread Jan Danielsson
On 09/13/12 16:02, Richard Hipp wrote:
 Is there any reason to try to keep Fossil working on windows9x?

   I don't think much Win9x development goes on today. But even if I'm
wrong, I would guess that the intersection between the sets Win9X
developers and Fossil users is roughly empty.

   Tag last win95-compatible version so anyone so inclined can dig it up
easily, just in case?

-- 
Kind regards,
Jan Danielsson




signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Support for Win9x?

2012-09-13 Thread Scott Robison
Even if someone is still supporting Win9X, it does not necessarily follow
that they are doing anything more that testing binaries in that
environment. I would not be heartbroken if such support were removed.

SDR
On Sep 13, 2012 8:25 AM, Jan Danielsson jan.m.daniels...@gmail.com
wrote:

 On 09/13/12 16:02, Richard Hipp wrote:
  Is there any reason to try to keep Fossil working on windows9x?

I don't think much Win9x development goes on today. But even if I'm
 wrong, I would guess that the intersection between the sets Win9X
 developers and Fossil users is roughly empty.

Tag last win95-compatible version so anyone so inclined can dig it up
 easily, just in case?

 --
 Kind regards,
 Jan Danielsson



 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Richard Hipp
On Thu, Sep 13, 2012 at 11:04 AM, Tommaso D'Argenio ping...@gmail.comwrote:



 just to add to this. I've set the remote-url with the correct server url
 and a user with developer permissions (at later stage I've also added admin
 and setup permissions, thinking that developer wasn't enough but no
 changes), and when I do commit I can see that fossil is sending data to the
 remote server via the autosync function I guess.


I think you may be confusing the repository on the server with the
check-out on the server.  Those are two different things.  The sync updates
the repository on the server, but it doesn't touch the check-out on the
server.  And that is by design and as it should be.

There are no previsions in Fossil for updating a remote check-out.


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Support for Win9x?

2012-09-13 Thread Steve Landers

On 13/09/2012, at 9:02 AM, Richard Hipp d...@sqlite.org wrote:

 Is there any reason to try to keep Fossil working on windows9x?

Only if  you are a technonecrophiliac

Steve
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 16:04:58 +0100
Tommaso D'Argenio ping...@gmail.com wrote:

  By the way I've also checked the autosync setting and it is set to
  ON, on both machines. Reading from the documentation
[...]
 just to add to this. I've set the remote-url with the correct server
 url and a user with developer permissions (at later stage I've also
 added admin and setup permissions, thinking that developer wasn't
 enough but no changes), and when I do commit I can see that fossil is
 sending data to the remote server via the autosync function I guess.
[...]
 What I'm doing is what it's written in the documentation as autosync
 workflow, yet it doesn't work. I'll probably just give up :(

I fail to see a problem statement here.
Autosync means that each time your commit, Fossil contacts the remote
repo and sees if the branch you're about to commit has been updated by
someone other's commit(s), and if it is, the contents is fetched and
you're requested to first do local merge and then re-try the push.
Otherwise, a fork would occur (a branch with two leaves).
You demonstrated that autosync works, so what's the problem?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] new files or modified files don't get updated on the remote server file system

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 14:57:03 +0100
Tommaso D'Argenio ping...@gmail.com wrote:

 I don't maintain the SVN server so I can't comment on the way it's
 configured.

That's probably important -- see below.

 My workflow is quite simple:
[...]
 -Right click on the folder  Tortoise  Commit and enter comment
 -Resolve conflicts (eventually)
 -Done, new files and update files on the server

Okay, this most probably means your repository has a so-called commit
hook which performs deployment of the checked in changes after each
commit is recorded.  A hook is usually a shell script (but it might be
any program at all) which is run by the SCM server software after a
specific event happens (a commit in this case).

AFAIK stock Fossil does not support hooks, but they can be possibly
implemented in a special build, see [1].

A much simpler way, as Richard have already proposed, might be to
deploy a no-brainer CGI script which would perform the deployment.

In the simplest form that could be a form with a button; in a more
elaborate case -- an entry for the revision (defaulting to the name of
some branch) to check out and the button.  The only problem I observe
with this setup is possible permissions issue: the credentials used by
your web server should provide read access to the relevant
repository file (may be even write access for SQLite locking to work --
I don't know this stuff to this level of detail, sorry).

1. 
http://lists.fossil-scm.org:8080/pipermail/fossil-users/2012-February/008221.html
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] trouble handling text files from SQL Server 2012

2012-09-13 Thread Kevin Greiner
I'm using fossil 1.23 on Windows 7. I'm attempting to store text files
generated by Microsoft SQL Server 2012 in fossil so I can easily track
their changes over time.

The problem is that fossil thinks these generated text files are binary
data which prevents me from viewing the files via the web ui and generating
diffs.

When I look at these files in a hex edtor, I see this: ff fe 53 00 45 00 54
00 20 00 41 00. A text editor shows SET A.

I've looked in the email list archive where DRH specifies that a null
character or a line longer than 8192 chars. The entire file is 1074 bytes
so it's not the length. Is fossil reading the 00 bytes as nulls?

Any idea why fossil thinks these files are binary? And, more importantly,
what encoding I can specify to prevent this? I've tried various
permutations of ASCII, UTF8, UTF7 to no effect.

Thanks,

Kevin
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] trouble handling text files from SQL Server 2012

2012-09-13 Thread Richard Hipp
On Thu, Sep 13, 2012 at 3:43 PM, Kevin Greiner grein...@gmail.com wrote:


 I'm using fossil 1.23 on Windows 7. I'm attempting to store text files
 generated by Microsoft SQL Server 2012 in fossil so I can easily track
 their changes over time.

 The problem is that fossil thinks these generated text files are binary
 data which prevents me from viewing the files via the web ui and generating
 diffs.

 When I look at these files in a hex edtor, I see this: ff fe 53 00 45 00
 54 00 20 00 41 00. A text editor shows SET A.

 I've looked in the email list archive where DRH specifies that a null
 character or a line longer than 8192 chars. The entire file is 1074 bytes
 so it's not the length. Is fossil reading the 00 bytes as nulls?

 Any idea why fossil thinks these files are binary? And, more importantly,
 what encoding I can specify to prevent this? I've tried various
 permutations of ASCII, UTF8, UTF7 to no effect.


The file itself appears to be in utf16le.  The diff facilities in Fossil
currently only know how to deal with utf8.



 Thanks,

 Kevin

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] trouble handling text files from SQL Server 2012

2012-09-13 Thread Kevin Greiner
On Thu, Sep 13, 2012 at 3:45 PM, Richard Hipp d...@sqlite.org wrote:


 The file itself appears to be in utf16le.  The diff facilities in Fossil
 currently only know how to deal with utf8.


Thanks, that was helpful. Turns out I was piping the output through another
utility (powershell) that was turning the text into Unicode by default.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread Richard Hipp
On Thu, Sep 13, 2012 at 3:45 PM, Richard Hipp d...@sqlite.org wrote:



 On Thu, Sep 13, 2012 at 3:43 PM, Kevin Greiner grein...@gmail.com wrote:


 I'm using fossil 1.23 on Windows 7. I'm attempting to store text files
 generated by Microsoft SQL Server 2012 in fossil so I can easily track
 their changes over time.

 The problem is that fossil thinks these generated text files are binary
 data which prevents me from viewing the files via the web ui and generating
 diffs.

 When I look at these files in a hex edtor, I see this: ff fe 53 00 45 00
 54 00 20 00 41 00. A text editor shows SET A.

 I've looked in the email list archive where DRH specifies that a null
 character or a line longer than 8192 chars. The entire file is 1074 bytes
 so it's not the length. Is fossil reading the 00 bytes as nulls?

 Any idea why fossil thinks these files are binary? And, more importantly,
 what encoding I can specify to prevent this? I've tried various
 permutations of ASCII, UTF8, UTF7 to no effect.


 The file itself appears to be in utf16le.  The diff facilities in Fossil
 currently only know how to deal with utf8.


It would be an interesting project to enhance Fossil so that it could
support UTF16 in addition to UTF8.  What would be needed is an algorithm to
detect when a file was UTF16.  (The BOM at the beginning of Kevin's example
ought to be a big hint.)  Then automatically call a convert routine to
generate UTF8 prior to passing the content into the diff logic, or into the
wiki engine, or prior to display on the UTF8 webpage, etc.

Basically, we need a routine that converts an in-memory buffer from UTF16
to UTF8, and leaves anything that isn't UTF16 unchanged.  Then we need to
call that routine in a few strategic places inside of Fossil

Volunteers to write that routine?  I'll help identify the places where it
needs to be called.





 Thanks,

 Kevin

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




 --
 D. Richard Hipp
 d...@sqlite.org




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] trouble handling text files from SQL Server 2012

2012-09-13 Thread Konstantin Khomoutov
On Thu, Sep 13, 2012 at 03:43:16PM -0400, Kevin Greiner wrote:

 I'm using fossil 1.23 on Windows 7. I'm attempting to store text files
 generated by Microsoft SQL Server 2012 in fossil so I can easily track
 their changes over time.
 
 The problem is that fossil thinks these generated text files are binary
 data which prevents me from viewing the files via the web ui and generating
 diffs.
 
 When I look at these files in a hex edtor, I see this: ff fe 53 00 45 00 54
 00 20 00 41 00. A text editor shows SET A.
This is a BOM (Byte-Order Mark) [1] followed by five UTF-16-encoded
characters comprising the string SET A.

 I've looked in the email list archive where DRH specifies that a null
 character or a line longer than 8192 chars. The entire file is 1074 bytes
 so it's not the length. Is fossil reading the 00 bytes as nulls?
 
 Any idea why fossil thinks these files are binary? And, more importantly,
 what encoding I can specify to prevent this? I've tried various
 permutations of ASCII, UTF8, UTF7 to no effect.
UTF-8 should be fine.  I dunno why fossil would consider an
UTF-8-encoded file as binary for byte sequences representing non-NUL
characters (including BOM) in UTF-8 do not contain zero bytes.

1. http://en.wikipedia.org/wiki/Byte_order_mark

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread Scott Robison
I'd like to assist with that contribution. Assuming someone hasn't already
done it by the time I click send. :)

SDR

On Thu, Sep 13, 2012 at 2:08 PM, Richard Hipp d...@sqlite.org wrote:



 On Thu, Sep 13, 2012 at 3:45 PM, Richard Hipp d...@sqlite.org wrote:



 On Thu, Sep 13, 2012 at 3:43 PM, Kevin Greiner grein...@gmail.comwrote:


 I'm using fossil 1.23 on Windows 7. I'm attempting to store text files
 generated by Microsoft SQL Server 2012 in fossil so I can easily track
 their changes over time.

 The problem is that fossil thinks these generated text files are binary
 data which prevents me from viewing the files via the web ui and generating
 diffs.

 When I look at these files in a hex edtor, I see this: ff fe 53 00 45
 00 54 00 20 00 41 00. A text editor shows SET A.

 I've looked in the email list archive where DRH specifies that a null
 character or a line longer than 8192 chars. The entire file is 1074 bytes
 so it's not the length. Is fossil reading the 00 bytes as nulls?

 Any idea why fossil thinks these files are binary? And, more
 importantly, what encoding I can specify to prevent this? I've tried
 various permutations of ASCII, UTF8, UTF7 to no effect.


 The file itself appears to be in utf16le.  The diff facilities in
 Fossil currently only know how to deal with utf8.


 It would be an interesting project to enhance Fossil so that it could
 support UTF16 in addition to UTF8.  What would be needed is an algorithm to
 detect when a file was UTF16.  (The BOM at the beginning of Kevin's example
 ought to be a big hint.)  Then automatically call a convert routine to
 generate UTF8 prior to passing the content into the diff logic, or into the
 wiki engine, or prior to display on the UTF8 webpage, etc.

 Basically, we need a routine that converts an in-memory buffer from UTF16
 to UTF8, and leaves anything that isn't UTF16 unchanged.  Then we need to
 call that routine in a few strategic places inside of Fossil

 Volunteers to write that routine?  I'll help identify the places where it
 needs to be called.





 Thanks,

 Kevin

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




 --
 D. Richard Hipp
 d...@sqlite.org




 --
 D. Richard Hipp
 d...@sqlite.org

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread Martin Gagnon
On Thu, Sep 13, 2012 at 4:08 PM, Richard Hipp d...@sqlite.org wrote:


 On Thu, Sep 13, 2012 at 3:45 PM, Richard Hipp d...@sqlite.org wrote:



 On Thu, Sep 13, 2012 at 3:43 PM, Kevin Greiner grein...@gmail.com wrote:


 I'm using fossil 1.23 on Windows 7. I'm attempting to store text files
 generated by Microsoft SQL Server 2012 in fossil so I can easily track their
 changes over time.

 The problem is that fossil thinks these generated text files are binary
 data which prevents me from viewing the files via the web ui and generating
 diffs.

 When I look at these files in a hex edtor, I see this: ff fe 53 00 45 00
 54 00 20 00 41 00. A text editor shows SET A.

 I've looked in the email list archive where DRH specifies that a null
 character or a line longer than 8192 chars. The entire file is 1074 bytes so
 it's not the length. Is fossil reading the 00 bytes as nulls?

 Any idea why fossil thinks these files are binary? And, more importantly,
 what encoding I can specify to prevent this? I've tried various permutations
 of ASCII, UTF8, UTF7 to no effect.


 The file itself appears to be in utf16le.  The diff facilities in Fossil
 currently only know how to deal with utf8.


 It would be an interesting project to enhance Fossil so that it could
 support UTF16 in addition to UTF8.  What would be needed is an algorithm to
 detect when a file was UTF16.  (The BOM at the beginning of Kevin's example
 ought to be a big hint.)  Then automatically call a convert routine to
 generate UTF8 prior to passing the content into the diff logic, or into the
 wiki engine, or prior to display on the UTF8 webpage, etc.

 Basically, we need a routine that converts an in-memory buffer from UTF16 to
 UTF8, and leaves anything that isn't UTF16 unchanged.  Then we need to call
 that routine in a few strategic places inside of Fossil

 Volunteers to write that routine?  I'll help identify the places where it
 needs to be called.


I guess this could help to write such routine:
http://unicode.org/faq/utf_bom.html

-- 
Martin G.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread David Given
On 13/09/12 21:08, Richard Hipp wrote:
[...]
 Basically, we need a routine that converts an in-memory buffer from
 UTF16 to UTF8, and leaves anything that isn't UTF16 unchanged.  Then we
 need to call that routine in a few strategic places inside of Fossil

Could you clarify what you mean by 'leaves anything that isn't UTF-16
unchanged'? Do you mean you just want it to convert up until the point
where it finds non-well-formed UTF-16 and then tells you where it
stopped, or do you actually want to leave the unconverted UTF-16 in the
output file? Because that last will just produce gibberish ---
non-well-formed UTF-8.

The standard way to do all these conversions is just to call out to
iconv, which handles all the horrible edge cases. It is available for
Windows, but it's not small.

OTOH if you don't care about the edge cases, converting well-formed
UTF-16 to UTF-8 is lossless and pretty straightforward.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] comparison with Git

2012-09-13 Thread Russ Paielli
OK, so apparently I misunderstood in thinking that the serverless,
zero-administration claim applies to Fossil. Thanks for the clarification.

If it were true, and if it distinguished Fossil from Git, I would have used
it in my advocacy of Fossil.

I am sold on the idea that Fossil is superior to Git on the basis of
simplicity alone. Than again, I am currently a minimal Fossil user. Being
an aero engineer rather than a developer per se, I'd rather not spend time
learning Git. The problem, as I have said before here, is that Git seems to
be the de facto standard for open-source software. So not knowing Git
essentially shuts you out of most open source. In addition, I feed slightly
uncomfortable forcing someone who already knows Git to learn Fossil in
order to work on my project. But maybe I shouldn't worry about that.

As I said before, it would be great if Fossil could interact with Git at a
push/pull level, but as I recall there are technical obstacles to that
idea. I am not trying to open up that can of worms again, although maybe I
just did.

--Russ P.

On Thu, Sep 13, 2012 at 4:36 AM, Richard Hipp d...@sqlite.org wrote:



 On Thu, Sep 13, 2012 at 3:13 AM, Russ Paielli russ.paie...@gmail.comwrote:

 I recall reading somewhere (can't seem to find it at the moment) that
 fossil is a serverless, zero-administration program. Is that true of git
 also? Thanks.


 We make that claim about the SQLite database engine.  See

 http://www.sqlite.org/about.html

 Fossil is the DVCS used to manages the SQLite sources, and Fossil is built
 on top of SQLite.  The homepages for Fossil and SQLite are hosted on the
 same machine.  But Fossil and SQLite are not the same thing.



 --Russ P.

 --
 http://RussP.us

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




 --
 D. Richard Hipp
 d...@sqlite.org

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
http://RussP.us
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread Scott Robison
I assumed (dangerous though it may be) that leaves anything that isn't
UTF-16 unchanged meant don't convert any buffer to UTF-8 if the
origination buffer is not UTF-16.

SDR

On Thu, Sep 13, 2012 at 5:04 PM, David Given d...@cowlark.com wrote:

 On 13/09/12 21:08, Richard Hipp wrote:
 [...]
  Basically, we need a routine that converts an in-memory buffer from
  UTF16 to UTF8, and leaves anything that isn't UTF16 unchanged.  Then we
  need to call that routine in a few strategic places inside of Fossil

 Could you clarify what you mean by 'leaves anything that isn't UTF-16
 unchanged'? Do you mean you just want it to convert up until the point
 where it finds non-well-formed UTF-16 and then tells you where it
 stopped, or do you actually want to leave the unconverted UTF-16 in the
 output file? Because that last will just produce gibberish ---
 non-well-formed UTF-8.

 The standard way to do all these conversions is just to call out to
 iconv, which handles all the horrible edge cases. It is available for
 Windows, but it's not small.

 OTOH if you don't care about the edge cases, converting well-formed
 UTF-16 to UTF-8 is lossless and pretty straightforward.

 --
 ┌─── dg@cowlark.com ─ http://www.cowlark.com ─
 │
 │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
 │ --- Conway's Game Of Life, in one line of APL


 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread Richard Hipp
You assume correctly.

The use of iconv won't do, though, since everything also needs to work on
Unix.  There are small, portable conversion routines in SQLite that you can
copy.

D. Richard Hipp - d...@sqlite.org
Sent from phone - pardon brevity

On Sep 13, 2012 7:44 PM, Scott Robison sc...@scottrobison.us wrote:

I assumed (dangerous though it may be) that leaves anything that isn't
UTF-16 unchanged meant don't convert any buffer to UTF-8 if the
origination buffer is not UTF-16.

SDR

On Thu, Sep 13, 2012 at 5:04 PM, David Given d...@cowlark.com wrote:

 
  On 13/09/12 21:08, Richard Hipp wrote:
  [...]
   Basically, we need a routine that converts an...

  ___
  fossil-users mailing list
  fossil-users@lists.f...



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil enhancement idea. Was: trouble handling text files from SQL Server 2012

2012-09-13 Thread Scott Robison
So I've spent some time writing a small and I think portable routine to
detect if a buffer is a valid UTF-16 (either little or big endian). It
rejects buffers if they contain an odd number of bytes or contain any of
the 66 non-character code-points or have invalid surrogate usage. While
this seems to work well on the handful of binary files I've tested it
against, I'm curious as to whether it would be desired to additionally use
some or all of the current binary file detection criteria? My thought being
that a file could be perfectly valid UTF-16 but have an extremely long line
or (worse in my opinion) embedded non-text characters (particularly U+
or non-white-space control codes).

SDR

On Thu, Sep 13, 2012 at 6:07 PM, Richard Hipp d...@sqlite.org wrote:

 You assume correctly.

 The use of iconv won't do, though, since everything also needs to work on
 Unix.  There are small, portable conversion routines in SQLite that you can
 copy.

 D. Richard Hipp - d...@sqlite.org
 Sent from phone - pardon brevity

 On Sep 13, 2012 7:44 PM, Scott Robison sc...@scottrobison.us wrote:

 I assumed (dangerous though it may be) that leaves anything that isn't
 UTF-16 unchanged meant don't convert any buffer to UTF-8 if the
 origination buffer is not UTF-16.

 SDR

 On Thu, Sep 13, 2012 at 5:04 PM, David Given d...@cowlark.com wrote:

 
  On 13/09/12 21:08, Richard Hipp wrote:
  [...]
   Basically, we need a routine that converts an...

  ___
  fossil-users mailing list
  fossil-users@lists.f...



 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users