kk, Thank you. Your timing is funny as I had *just* given up on waiting for help and tried again with success this time.
What I did was deleted my whole source/ dir, leaving only my foo.fossil. (Luckily I had just done a commit before any of this reorganization stuff) I did fossil open foo.fossil in my project/ dir, and it spewed all of my files into the dir, as expected. Then I did mkdir source; mkdir source/code, then added both of those dirs to Fossil. Then I did fossil mv file.h source/code/file.h for all of my files. THEN I moved the actual files into that dir. Now everything is happy apparently. Thanks again for taking the time to write kk. ^K on Dec 16, 2012, kk <kkinn...@megagate.com> wrote: > >On 12/16/2012 K <k...@lightpowered.org> wrote: > > > I'm new to Fossil SCM, have not used any other SCMs, > > and am trying to do something relatively complex for > > me. It involves moving from a model where files are > > directly added to my repo, rather than being organized > > in the repo within directories. > > > > I had my project organized as: > > > > project/ > > * <non versioned project files> > > * foo.fossil - versioned file repo. > > * foo.xcodeproj - project configuration in Apple Xcode's format. > > * sourcecode/ - source code files and check out directory. > > > > > > I want to reorganize, and so I have: > > > > * moved (on my file system) foo.xcodeproj into the sourcecode/ dir. > > * renamed (on my file system) sourcecode/ to source/. > > * moved (on my file system) source code files from source/ into > > source/code/. > > > > I also want to change from my check out being in > > source, to /containing/ source. So in my above file > > system layout, I want to promote my foo.fossil from > > project/code, to project/, so when it's checked out it > > produces a single directory named "source". (As I > > expand use of Fossil SCM, I'll add other project/dirs) > > > > I ran into some problems and would appreciate help. > > > > > > " > > Last login: Thu Dec 13 23:41:48 on console > > notebook:~ ktk$ cd source/ > > notebook:source ktk$ ls -l > > total 0 > > drwxr-xr-x 25 ktk staff 850 Dec 15 22:37 code > > drwxr-xr-x 5 ktk staff 170 Dec 15 22:39 foo.xcodeproj > > notebook:source ktk$ ls -la > > total 40 > > drwxr-xr-x 6 ktk staff 204 Dec 15 22:37 . > > drwxr-xr-x 6 ktk staff 204 Dec 15 22:37 .. > > -rw-r--r--@ 1 ktk staff 6148 Dec 15 22:37 .DS_Store > > -rw-r--r-- 1 ktk staff 10240 Nov 30 22:31 .fslckout > > drwxr-xr-x 25 ktk staff 850 Dec 15 22:37 code > > drwxr-xr-x 5 ktk staff 170 Dec 15 22:39 foo.xcodeproj > > notebook:source ktk$ fossil changes > > MISSING foo.c > > MISSING foo.h > > notebook:source ktk$ fossil help mv > > Usage: fossil mv|rename OLDNAME NEWNAME > > or: fossil mv|rename OLDNAME... DIR > > > > Move or rename one or more files or directories within the > > repository tree. > > You can either rename a file or directory or move it to > > another subdirectory. > > > > This command does NOT rename or move the files on disk. This > > command merely > > records the fact that filenames have changed so that > > appropriate notations can be made at the next commit/checkin. > > > > See also: changes, status > >You were on the right track, here. 'mv' will tell fossil >that you have changed the path of an existing file. > > > notebook:source ktk$ fossil help (At this point I was > > looking to see if I needed to "fossil mkdir code" to > > "fossil mv foo.h code/") > > Usage: fossil help COMMAND > > Common COMMANDs: (use "fossil help --all" for a complete list) > > add clean gdiff mv rm timeline > > addremove clone help open settings ui > > all commit import pull sqlite3 undo > > annotate diff info push stash update > > bisect export init rebuild status version > > branch extras ls remote-url sync > > changes finfo merge revert tag > > This is fossil version 1.24 [8d758d3715] 2012-10-22 12:48:04 UTC > > notebook:source ktk$ fossil help add > > Usage: fossil add ?OPTIONS? FILE1 ?FILE2 ...? > > > > Make arrangements to add one or more files or directories to the > > current checkout at the next commit. > > > > When adding files or directories recursively, filenames that begin > > with "." are excluded by default. To include such files, add > > the "--dotfiles" option to the command-line. > > > > The --ignore option is a comma-separate list of glob patterns > > for files > > to be excluded. Example: '*.o,*.obj,*.exe' If the --ignore option > > does not appear on the command line then the "ignore-glob" setting is > > used. > > > > The --case-sensitive option determines whether or not filenames should > > be treated case sensitive or not. If the option is not given, the > > default > > depends on the global setting, or the operating system default, if > > not set. > > > > Options: > > > > --case-sensitive <BOOL> override case-sensitive setting > > --dotfiles include files beginning with a dot (".") > > --ignore <CSG> ignore files matching patterns from the > > comma separated list of glob patterns. > > > > See also: addremove, rm > > notebook:source ktk$ fossil add code > > ADDED code/foo.c > > ADDED code/foo.h > > notebook:source ktk$ fossil changes (Thinking at this > > point "maybe Fossil can 'see' the missing files now, > > and they will be 'FOUND'?) > >Nope. What 'add' does is add a file to source control. >As far as fossil is concerned, you added brand new files >to the checkout. > > > MISSING foo.c > > MISSING foo.h > > ADDED code/foo.c > > ADDED code/foo.h > > notebook:source ktk$ fossil mv foo.c code/ > > RENAME foo.c code/foo.c > > fossil: SQLITE_CONSTRAINT: abort at 38 in [UPDATE vfile SET > > pathname='code/foo.c' WHERE pathname='foo.c' AND vid=55]: columns > > pathname, vid are not unique > > fossil: columns pathname, vid are not unique > > UPDATE vfile SET pathname='code/foo.c' WHERE pathname='foo.c' AND > > vid=55 > > > > If you have recently updated your fossil executable, you might > > need to run "fossil all rebuild" to bring the repository > > schemas up to date. > > notebook:source ktk$ > > " > >This time, you're asking fossil to update against the >rules. You're asking Fossil to move a filename over an >existing filename IN THE DATABASE. > >Remember that Fossil isn't usually 'doing things' to the >files on the disk, other than recording their content. >Most of the things it does are database operations--to >maintain a history of source files (and let you go back >in time if necessary)--and to let you collaborate without >getting bollixed by multiple people changing things. > >If you haven't done a commit yet, you can just back out >your changes and then use the fossil 'mv' command to >change the recorded locations of the files you physically >moved. I wouldn't recommend doing a 'fossil rm' on the >original locations, because it will lose history. > >If you *have* done a commit, it will take a few more >steps to get where you want to be. > > > > > > > Thank you for any help. > > > > ^K > > > > > > >--kkinnellOn 12/16/2012 K <k...@lightpowered.org> wrote: > >Hello, > >I'm new to Fossil SCM, have not used any other SCMs, and am trying to do >something relatively complex for me. It involves moving from a model >where files are directly added to my repo, rather than being organized >in the repo within directories. > >I had my project organized as: > >project/ >* <non versioned project files> >* foo.fossil - versioned file repo. >* foo.xcodeproj - project configuration in Apple Xcode's format. >* sourcecode/ - source code files and check out directory. > > >I want to reorganize, and so I have: > >* moved (on my file system) foo.xcodeproj into the sourcecode/ dir. >* renamed (on my file system) sourcecode/ to source/. >* moved (on my file system) source code files from source/ into >source/code/. > >I also want to change from my check out being in source, to /containing/ >source. So in my above file system layout, I want to promote my >foo.fossil from project/code, to project/, so when it's checked out it >produces a single directory named "source". (As I expand use of Fossil >SCM, I'll add other project/dirs) > >I ran into some problems and would appreciate help. > > >" >Last login: Thu Dec 13 23:41:48 on console >notebook:~ ktk$ cd source/ >notebook:source ktk$ ls -l >total 0 >drwxr-xr-x 25 ktk staff 850 Dec 15 22:37 code >drwxr-xr-x 5 ktk staff 170 Dec 15 22:39 foo.xcodeproj >notebook:source ktk$ ls -la >total 40 >drwxr-xr-x 6 ktk staff 204 Dec 15 22:37 . >drwxr-xr-x 6 ktk staff 204 Dec 15 22:37 .. >-rw-r--r--@ 1 ktk staff 6148 Dec 15 22:37 .DS_Store >-rw-r--r-- 1 ktk staff 10240 Nov 30 22:31 .fslckout >drwxr-xr-x 25 ktk staff 850 Dec 15 22:37 code >drwxr-xr-x 5 ktk staff 170 Dec 15 22:39 foo.xcodeproj >notebook:source ktk$ fossil changes >MISSING foo.c >MISSING foo.h >notebook:source ktk$ fossil help mv >Usage: fossil mv|rename OLDNAME NEWNAME > or: fossil mv|rename OLDNAME... DIR > >Move or rename one or more files or directories within the repository tree. >You can either rename a file or directory or move it to another >subdirectory. > >This command does NOT rename or move the files on disk. This command merely >records the fact that filenames have changed so that appropriate notations >can be made at the next commit/checkin. > >See also: changes, status >notebook:source ktk$ fossil help (At this point I was looking to see if >I needed to "fossil mkdir code" to "fossil mv foo.h code/") >Usage: fossil help COMMAND >Common COMMANDs: (use "fossil help --all" for a complete list) >add clean gdiff mv rm timeline >addremove clone help open settings ui >all commit import pull sqlite3 undo >annotate diff info push stash update >bisect export init rebuild status version >branch extras ls remote-url sync >changes finfo merge revert tag >This is fossil version 1.24 [8d758d3715] 2012-10-22 12:48:04 UTC >notebook:source ktk$ fossil help add >Usage: fossil add ?OPTIONS? FILE1 ?FILE2 ...? > >Make arrangements to add one or more files or directories to the >current checkout at the next commit. > >When adding files or directories recursively, filenames that begin >with "." are excluded by default. To include such files, add >the "--dotfiles" option to the command-line. > >The --ignore option is a comma-separate list of glob patterns for files >to be excluded. Example: '*.o,*.obj,*.exe' If the --ignore option >does not appear on the command line then the "ignore-glob" setting is >used. > >The --case-sensitive option determines whether or not filenames should >be treated case sensitive or not. If the option is not given, the default >depends on the global setting, or the operating system default, if not set. > >Options: > > --case-sensitive <BOOL> override case-sensitive setting > --dotfiles include files beginning with a dot (".") > --ignore <CSG> ignore files matching patterns from the > comma separated list of glob patterns. > >See also: addremove, rm >notebook:source ktk$ fossil add code >ADDED code/foo.c >ADDED code/foo.h >notebook:source ktk$ fossil changes (Thinking at this point "maybe >Fossil can 'see' the missing files now, and they will be 'FOUND'?) >MISSING foo.c >MISSING foo.h >ADDED code/foo.c >ADDED code/foo.h >notebook:source ktk$ fossil mv foo.c code/ >RENAME foo.c code/foo.c >fossil: SQLITE_CONSTRAINT: abort at 38 in [UPDATE vfile SET >pathname='code/foo.c' WHERE pathname='foo.c' AND vid=55]: columns >pathname, vid are not unique >fossil: columns pathname, vid are not unique >UPDATE vfile SET pathname='code/foo.c' WHERE pathname='foo.c' AND vid=55 > >If you have recently updated your fossil executable, you might >need to run "fossil all rebuild" to bring the repository >schemas up to date. >notebook:source ktk$ >" > > > >Thank you for any help. > >^K > > >-- > >--kkinnell >_______________________________________________ >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