Re: [fossil-users] [Feature-request] Unversioned files: unpack

2018-06-09 Thread Chris Rydalch
I don't think the patch attachment made it; here it is just in case:

Index: src/unversioned.c
==
--- src/unversioned.c
+++ src/unversioned.c
@@ -230,10 +230,13 @@
 **cat FILE ... Concatenate the content of FILEs to stdout.
 **
 **edit FILEBring up FILE in a text editor for modification.
 **
 **export FILE OUTPUT   Write the content of FILE into OUTPUT on disk
+**
+**unpack   Write all unversioned files to disk, matching
the
+** file name(s) in the local repository.
 **
 **list | lsShow all unversioned files held in the local
 ** repository.
 **
 **revert ?URL? Restore the state of all unversioned files in
the
@@ -372,10 +375,22 @@
 if( unversioned_content(g.argv[3], ) ){
   fossil_fatal("no such uv-file: %Q", g.argv[3]);
 }
 blob_write_to_file(, g.argv[4]);
 blob_reset();
+  }else if( memcmp(zCmd, "unpack", nCmd)==0 ){
+Blob content;
+Stmt q;
+verify_all_options();
+db_prepare(, "SELECT name FROM unversioned;");
+while( db_step()==SQLITE_ROW ){
+  const char *zName = db_column_text(, 0);
+  unversioned_content(zName, );
+  blob_write_to_file(, zName);
+}
+blob_reset();
+db_finalize();
   }else if( memcmp(zCmd, "hash", nCmd)==0 ){  /* undocumented */
 /* Show the hash value used during uv sync */
 int debugFlag = find_option("debug",0,0)!=0;
 fossil_print("%s\n", unversioned_content_hash(debugFlag));
   }else if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){


On Sat, Jun 9, 2018 at 12:43 PM Chris Rydalch  wrote:

> Here is a patch to add ' fossil uv unpack', which exports each unversioned
> file local disk, using the name(s) from the local repository. Does have all
> the nice bells and whistles, but its worked for me so far.
>
>unpack   Write all unversioned files to disk, matching the
> file name(s) in the local repository.
>
> Would this be worth including in fossil?
>
> Thanks!
>
> On Tue, Apr 25, 2017 at 1:48 PM Chris Rydalch  wrote:
>
>> Yes, this would be great!
>>
>> On Tue, Apr 25, 2017 at 1:43 PM, Olivier R.  wrote:
>>
>>> Hello,
>>>
>>> It would be very useful if the repository could remember the folder of
>>> the unversioned files when we add them. Doing so, we could unpack all
>>> unversioned files with a simple command like:
>>> fossil uv unpack
>>>
>>> If a folder doesn’t exist anymore, we could recreate it with the option
>>> -f or --force, or ignore the files who have nowhere to be unpacked.
>>>
>>> If each unversioned file is associated with a folder, it would also be
>>> useful to have a way to edit it, via the CLI or the Web-UI, so that we
>>> could change where to unpack these files.
>>>
>>> Thanks.
>>> Olivier
>>> ___
>>> 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] [Feature-request] Unversioned files: unpack

2018-06-09 Thread Chris Rydalch
Here is a patch to add ' fossil uv unpack', which exports each unversioned
file local disk, using the name(s) from the local repository. Does have all
the nice bells and whistles, but its worked for me so far.

   unpack   Write all unversioned files to disk, matching the
file name(s) in the local repository.

Would this be worth including in fossil?

Thanks!

On Tue, Apr 25, 2017 at 1:48 PM Chris Rydalch  wrote:

> Yes, this would be great!
>
> On Tue, Apr 25, 2017 at 1:43 PM, Olivier R.  wrote:
>
>> Hello,
>>
>> It would be very useful if the repository could remember the folder of
>> the unversioned files when we add them. Doing so, we could unpack all
>> unversioned files with a simple command like:
>> fossil uv unpack
>>
>> If a folder doesn’t exist anymore, we could recreate it with the option
>> -f or --force, or ignore the files who have nowhere to be unpacked.
>>
>> If each unversioned file is associated with a folder, it would also be
>> useful to have a way to edit it, via the CLI or the Web-UI, so that we
>> could change where to unpack these files.
>>
>> Thanks.
>> Olivier
>> ___
>> 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] [Feature-request] Unversioned files: unpack

2017-04-25 Thread Chris Rydalch
Yes, this would be great!

On Tue, Apr 25, 2017 at 1:43 PM, Olivier R.  wrote:

> Hello,
>
> It would be very useful if the repository could remember the folder of the
> unversioned files when we add them. Doing so, we could unpack all
> unversioned files with a simple command like:
> fossil uv unpack
>
> If a folder doesn’t exist anymore, we could recreate it with the option -f
> or --force, or ignore the files who have nowhere to be unpacked.
>
> If each unversioned file is associated with a folder, it would also be
> useful to have a way to edit it, via the CLI or the Web-UI, so that we
> could change where to unpack these files.
>
> Thanks.
> Olivier
> ___
> 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] [Feature-request] Unversioned files: unpack

2017-04-25 Thread Olivier R.

Hello,

It would be very useful if the repository could remember the folder of 
the unversioned files when we add them. Doing so, we could unpack all 
unversioned files with a simple command like:

fossil uv unpack

If a folder doesn’t exist anymore, we could recreate it with the option 
-f or --force, or ignore the files who have nowhere to be unpacked.


If each unversioned file is associated with a folder, it would also be 
useful to have a way to edit it, via the CLI or the Web-UI, so that we 
could change where to unpack these files.


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