Re: [fossil-users] fossil all remove?

2016-02-20 Thread Andy Bradford
Thus said Richard Hipp on Fri, 19 Feb 2016 19:51:25 -0500:

> Again, I think the cleanup should be automatic.

It is for  the most part automatic. It isn't  automatic if the directory
still exists  but is no longer  a checkout. For example,  I accidentally
opened up a repository in /tmp  one time and apparently never closed it.
The repository  is long since gone,  but fossil continues to  hold on to
/tmp/:

$ fossil all ls -c | grep '^/tmp'
/tmp/
$ fossil all ignore -c /tmp/ 
$ fossil all ls -c | grep '^/tmp'
/tmp/

This  failed because  when the  ckout  is written  to the  global_config
table, it is stored with the trailing slash (derived from g.zLocalRoot).
But there  is no g.zLocalRoot  to use when  using ``fossil all''  so the
slash needs to be put back on.

This now works with:

http://www.fossil-scm.org/index.html/info/f7a5e10ce9337280

$ /tmp/fossil all ignore -c /tmp/
$ /tmp/fossil all ls -c | grep '^/tmp'
$ 

I wonder though, should fossil just automatically check for the presence
of the  local repository  and not just  the directory  and automatically
remove the ckout if there is no local repository in the directory?

Thanks,

Andy
-- 
TAI64 timestamp: 400056c8d3cd


___
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 all remove?

2016-02-19 Thread Ross Berteig


On 2/19/2016 4:51 PM, Richard Hipp wrote:

On 2/19/16, Warren Young  wrote:
Again, I think the cleanup should be automatic.  But if you are still
having trouble the "fossil all ignore DIRECTORY" command should
manually remove the offending check-out from the list.  Maybe the "-c"
option is also needed - unclear.


This reminded me to look, and my recent obsession with the test suite 
has littered my fossil all list output with all the places I ran the 
tests. Which leads to two observations:


1. I thought I saw code in tester.tcl to prevent that... either I was 
misreading, or it doesn't work for me on Windows. Both are likely. I'll 
take a look at that "real soon now".


2. fossil all ignore only works for precisely named repositories, or 
with the -c option for named directories that are open workspaces. It 
would be nice if a path prefix could be used. Specifically, I was hoping 
that


C:> fossil all ignore C:\Users\Ross\Tmp\fbuild

would ignore the dozen repositories (and checkouts if repeated with -c) 
located below that path, since that folder is an out-of-tree build of 
fossil where I ran the test suite. I have several more folders just like 
it (built with different configurations).


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/

___
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 all remove?

2016-02-19 Thread Richard Hipp
On 2/19/16, Warren Young  wrote:
> On Feb 19, 2016, at 3:06 AM, Tino Lange 
> wrote:
>>
>> How can I get rid of an entry in "fossil all ls -c" for which the
>> checkout does not exist anymore? Do I need to fiddle with SQL?
>
> I think this happens when you nuke a fossil checkout (e.g. via rm -rf)
> without saying “fossil close” first.
>
> It used to happen to me with temporary and test repo checkouts until I got
> into the habit of saying “fossil close” on them before nuking them.

Again, I think the cleanup should be automatic.  But if you are still
having trouble the "fossil all ignore DIRECTORY" command should
manually remove the offending check-out from the list.  Maybe the "-c"
option is also needed - unclear.

-- 
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] fossil all remove?

2016-02-19 Thread Warren Young
On Feb 19, 2016, at 3:06 AM, Tino Lange  wrote:
> 
> How can I get rid of an entry in "fossil all ls -c" for which the 
> checkout does not exist anymore? Do I need to fiddle with SQL?

I think this happens when you nuke a fossil checkout (e.g. via rm -rf) without 
saying “fossil close” first.

It used to happen to me with temporary and test repo checkouts until I got into 
the habit of saying “fossil close” on them before nuking them.
___
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 all remove?

2016-02-19 Thread Tino Lange
> Should be automatic.  When you do "fossil all ls -c", Fossil checks that
> each of the check-out directories exists, and removes any that do not
> exist from the list.

Thanks. The directory still exists (but with some other content now, 
especially it has no .fslckout file)

So I'll move it away, do a "fossil all ls -c" and move it afterwards back 
to its location :-)

___
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 all remove?

2016-02-19 Thread Stephan Beal
On Fri, Feb 19, 2016 at 11:06 AM, Tino Lange  wrote:

> Hi Fossilers,
>
> There is no "fossil all remove".
> How can I get rid of an entry in "fossil all ls -c" for which the
> checkout does not exist anymore? Do I need to fiddle with SQL?
>

Fossil all recognizes when it sees a non-existing checkout and removes it
from its list. Or it did the last time i looked at that code. (Or that's
how i remember it, anyway!)

  /* If any repositories whose names appear in the ~/.fossil file could not
  ** be found, remove those names from the ~/.fossil file.
  */
  if( nToDel>0 ){
const char *zSql = "DELETE FROM global_config WHERE name IN toDel";
if( dryRunFlag ){
  fossil_print("%s\n", zSql);
}else{
  db_multi_exec("%s", zSql /*safe-for-%s*/ );
}
  }


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"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] fossil all remove?

2016-02-19 Thread Richard Hipp
On 2/19/16, Tino Lange  wrote:
> Hi Fossilers,
>
> There is no "fossil all remove".
> How can I get rid of an entry in "fossil all ls -c" for which the
> checkout does not exist anymore? Do I need to fiddle with SQL?
>

Should be automatic.  When you do "fossil all ls -c", Fossil checks
that each of the check-out directories exists, and removes any that do
not exist from the list.

Note that it only checks for the existence of the named directories.
It does not try to verify that each directory is in fact a valid
checkout.

-- 
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] fossil all remove?

2016-02-19 Thread Tino Lange
Hi Fossilers,

There is no "fossil all remove".
How can I get rid of an entry in "fossil all ls -c" for which the 
checkout does not exist anymore? Do I need to fiddle with SQL?

Thanks

Tino

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