Re: [fossil-users] Older fossil archives are not rebuild-able

2017-12-12 Thread Andreas Kupries

> On 12/12/17, J Knight  wrote:
> > Hello. I have some older fossil archives that report:
> >
> > SQLITE_ERROR: table config has no column named mtime
> > fossil: table config has no column named mtime: {REPLACE INTO
> > config(name,value,mtime) VALUES('hash-policy',1,now())}
> >
> > issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. 
> > Is there
> > some way to bring these up to date or somehow migrate?
> 
> The update should be automatic by these lines:
> https://www.fossil-scm.org/fossil/artifact/e094c603?ln=81-85
> 
> I don't know why it is not working for you.


I ran into the same thing last week as well, with very old repo.

My workaround was to use a high 1.x version of fossil (*) and use that
to `fossil rebuild`. This updated the schema and after that my fossil
2.4 was able to handle the repo too.

(*) I still had 1.37 around, and now I am keeping that version for
some time longer.

I suspect that something about (old) schema updates does not work
across the 1.x / 2.x border.

> Possible work-around:
> 
>  Run:   fossil sql $yourrepo
>  Enter:  ALTER TABLE config ADD COLUMN mtime INTEGER;
>  Then: UPDATE config SET mtime=now();
> 
> Let me know if that helps.

-- 
See you,
Andreas Kupries 

Developer @ SUSE (MicroFocus Canada LLC)

---




___
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] Older fossil archives are not rebuild-able

2017-12-12 Thread J2
Ok, I managed to get it to rebuild. I had to use sqlite3 to do it though. 
`fossil sql -R repo` gave me the same error as before so:

$> sqlite3 repo
SQLite> ALTER TABLE config ADD COLUMN mtime INTEGER;
SQLite> UPDATE config SET mtime=date('now');
SQLite> .q
$> fossil rebuild repo

And all is well. Thanks for the clues 


From: Richard Hipp
Sent: December 12, 2017 2:06 PM
To: Fossil SCM user's discussion
Subject: Re: [fossil-users] Older fossil archives are not rebuild-able

On 12/12/17, J Knight <j...@j2mfk.com> wrote:
> Hello. I have some older fossil archives that report:
>
> SQLITE_ERROR: table config has no column named mtime
> fossil: table config has no column named mtime: {REPLACE INTO
> config(name,value,mtime) VALUES('hash-policy',1,now())}
>
> issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. Is there
> some way to bring these up to date or somehow migrate?

The update should be automatic by these lines:
https://www.fossil-scm.org/fossil/artifact/e094c603?ln=81-85

I don't know why it is not working for you.

Possible work-around:

 Run:   fossil sql $yourrepo
 Enter:  ALTER TABLE config ADD COLUMN mtime INTEGER;
 Then: UPDATE config SET mtime=now();

Let me know if that helps.


>
> thanks
>
>
>


-- 
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] Older fossil archives are not rebuild-able

2017-12-12 Thread Richard Hipp
On 12/12/17, J Knight  wrote:
> Hello. I have some older fossil archives that report:
>
> SQLITE_ERROR: table config has no column named mtime
> fossil: table config has no column named mtime: {REPLACE INTO
> config(name,value,mtime) VALUES('hash-policy',1,now())}
>
> issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. Is there
> some way to bring these up to date or somehow migrate?

The update should be automatic by these lines:
https://www.fossil-scm.org/fossil/artifact/e094c603?ln=81-85

I don't know why it is not working for you.

Possible work-around:

 Run:   fossil sql $yourrepo
 Enter:  ALTER TABLE config ADD COLUMN mtime INTEGER;
 Then: UPDATE config SET mtime=now();

Let me know if that helps.


>
> thanks
>
>
>


-- 
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] Older fossil archives are not rebuild-able

2017-12-12 Thread Martin Gagnon
What version of fossil are you using right now ? 
(Output of "fossil version")


-- 
Martin G.

> Le 12 déc. 2017 à 12:57, J Knight  a écrit :
> 
> Hello. I have some older fossil archives that report:
>  
> SQLITE_ERROR: table config has no column named mtime
> fossil: table config has no column named mtime: {REPLACE INTO 
> config(name,value,mtime) VALUES('hash-policy',1,now())}
>  
> issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. Is there 
> some way to bring these up to date or somehow migrate?
>  
> thanks
>  
>  
> ___
> 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] Older fossil archives are not rebuild-able

2017-12-12 Thread J2
Thanks for the reply. No luck though, same error.

From: Stephan Beal
Sent: December 12, 2017 1:10 PM
To: Fossil SCM user's discussion
Subject: Re: [fossil-users] Older fossil archives are not rebuild-able

On Tue, Dec 12, 2017 at 6:57 PM, J Knight <j...@j2mfk.com> wrote:
Hello. I have some older fossil archives that report:
 
SQLITE_ERROR: table config has no column named mtime
fossil: table config has no column named mtime: {REPLACE INTO 
config(name,value,mtime) VALUES('hash-policy',1,now())}
 
issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. Is there some 
way to bring these up to date or somehow migrate?

i'm not 100% certain that this will do the job, but it's worth a try...

See:

[stephan@host:~]$ f help decon
Usage f deconstruct ?OPTIONS? DESTINATION


This command exports all artifacts of a given repository and
writes all artifacts to the file system. The DESTINATION directory
will be populated with subdirectories AA and files AA/B.., where
AAB.. is the 40+ character artifact ID, AA the first 2 characters.
If -L|--prefixlength is given, the length (default 2) of the directory
prefix can be set to 0,1,..,9 characters.

Options:
  -R|--repository REPOSITORY  deconstruct given REPOSITORY
  -L|--prefixlength N         set the length of the names of the DESTINATION
                              subdirectories to N
  --private                   Include private artifacts.

See also: rebuild, reconstruct

[stephan@host:~]$ f help recon
Usage: f reconstruct FILENAME DIRECTORY

This command studies the artifacts (files) in DIRECTORY and
reconstructs the fossil record from them. It places the new
fossil repository in FILENAME. Subdirectories are read, files
with leading '.' in the filename are ignored.

See also: deconstruct, rebuil


So... (untested)...

fossil decon -R repo.file ~/tmp/xxx

Then:

fossil recon repo-new.file ~/tmp/xxx


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those 
who insist on a perfect world, freedom will have to do." -- Bigby Wolf

___
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] Older fossil archives are not rebuild-able

2017-12-12 Thread Stephan Beal
On Tue, Dec 12, 2017 at 6:57 PM, J Knight  wrote:

> Hello. I have some older fossil archives that report:
>
>
>
> SQLITE_ERROR: table config has no column named mtime
>
> fossil: table config has no column named mtime: {REPLACE INTO
> config(name,value,mtime) VALUES('hash-policy',1,now())}
>
>
>
> issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. Is there
> some way to bring these up to date or somehow migrate?
>

i'm not 100% certain that this will do the job, but it's worth a try...

See:

[stephan@host:~]$ f help decon
Usage f deconstruct ?OPTIONS? DESTINATION


This command exports all artifacts of a given repository and
writes all artifacts to the file system. The DESTINATION directory
will be populated with subdirectories AA and files AA/B.., where
AAB.. is the 40+ character artifact ID, AA the first 2 characters.
If -L|--prefixlength is given, the length (default 2) of the directory
prefix can be set to 0,1,..,9 characters.

Options:
  -R|--repository REPOSITORY  deconstruct given REPOSITORY
  -L|--prefixlength N set the length of the names of the DESTINATION
  subdirectories to N
  --private   Include private artifacts.

See also: rebuild, reconstruct

[stephan@host:~]$ f help recon
Usage: f reconstruct FILENAME DIRECTORY

This command studies the artifacts (files) in DIRECTORY and
reconstructs the fossil record from them. It places the new
fossil repository in FILENAME. Subdirectories are read, files
with leading '.' in the filename are ignored.

See also: deconstruct, rebuil


So... (untested)...

fossil decon -R repo.file ~/tmp/xxx

Then:

fossil recon repo-new.file ~/tmp/xxx


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Older fossil archives are not rebuild-able

2017-12-12 Thread J Knight
Hello. I have some older fossil archives that report:

SQLITE_ERROR: table config has no column named mtime
fossil: table config has no column named mtime: {REPLACE INTO 
config(name,value,mtime) VALUES('hash-policy',1,now())}

issuing a ‘rebuild’ and a ‘rebuild –force’ gives the same error. Is there some 
way to bring these up to date or somehow migrate?

thanks


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