Re: Can import also convert the source to a working copy
Branko Čibej wrote on Thu, 15 Mar 2018 21:37 +0100: > On 15.03.2018 20:18, Bo Berglund wrote: > > On Thu, 15 Mar 2018 13:45:13 -0400, Kris Deugau > > wrote: > > > >> Unless I misread your original post, the very first option in that link > >> looks like a better fit. To rephrase it somewhat for your case: > >> > >> 1) Create a repository or a directory in the repository > >> 2) Create your local files > >> 3) Check out the empty repository path to your workspace - this won't > >> overwrite any of your files > >> 4) svn add [files] > >> 5) svn ci > >> 6) Continue working as usual > >> > >> This avoids a round trip to the server to push the current files, then > >> pull them back down to create the formal SVN working copy with things > >> already in it - instead you "check out" an empty directory which should > >> be quite fast. > >> > > I readthat page as best I could but it looked so much Linuxish > > What on earth is Linuxish about it? You don't have to use the 'svn' client; you can use any Subversion client (a GUI client, TortoiseSVN, IDE integrations...). The docs always use the 'svn' client because (1) it's the only non-third- party client, (2) it's a command-line client so it's easier to give instructions for it.
Re: Can import also convert the source to a working copy
On 15.03.2018 20:18, Bo Berglund wrote: > On Thu, 15 Mar 2018 13:45:13 -0400, Kris Deugau > wrote: > >> Unless I misread your original post, the very first option in that link >> looks like a better fit. To rephrase it somewhat for your case: >> >> 1) Create a repository or a directory in the repository >> 2) Create your local files >> 3) Check out the empty repository path to your workspace - this won't >> overwrite any of your files >> 4) svn add [files] >> 5) svn ci >> 6) Continue working as usual >> >> This avoids a round trip to the server to push the current files, then >> pull them back down to create the formal SVN working copy with things >> already in it - instead you "check out" an empty directory which should >> be quite fast. >> > I readthat page as best I could but it looked so much Linuxish What on earth is Linuxish about it? Files and directories exist on Windows, too, it doesn't matter what the names are. If you can't extrapolate instructions to your specific OS, you'll have no end of trouble using any tool that works with files and directories ... > that I > lost track of how it could be done and then finding the other reply > and looking up that led me to the procedure I showed. > Also, I normally already have the files when subversion comes into > play... That does not matter. The point is that you check out an empty tree in the repository over an existing tree in your local filesystem and that will magically create a working copy with no versioned objects in it. -- Brane
Re: Can import also convert the source to a working copy
On Thu, 15 Mar 2018 13:45:13 -0400, Kris Deugau wrote: >Unless I misread your original post, the very first option in that link >looks like a better fit. To rephrase it somewhat for your case: > >1) Create a repository or a directory in the repository >2) Create your local files >3) Check out the empty repository path to your workspace - this won't >overwrite any of your files >4) svn add [files] >5) svn ci >6) Continue working as usual > >This avoids a round trip to the server to push the current files, then >pull them back down to create the formal SVN working copy with things >already in it - instead you "check out" an empty directory which should >be quite fast. > I readthat page as best I could but it looked so much Linuxish that I lost track of how it could be done and then finding the other reply and looking up that led me to the procedure I showed. Also, I normally already have the files when subversion comes into play... -- Bo Berglund Developer in Sweden
Re: Can import also convert the source to a working copy
Bo Berglund wrote: On Thu, 15 Mar 2018 12:03:53 +0100, Johan Corveleyn wrote: See http://subversion.apache.org/faq.html#in-place-import Seems like the best option is as follows: - svn import WiFiConfig /WiFiConfig/trunk --depth files -m "msg" svn co WiFiConfig/trunk --force WiFiConfig I.e. First import the directory and then immediately check out the same with --force It still takes some time because I think svn needs to download the files into the cache in the .svn directory. I have a rather slow connection to the server from where I am... Unless I misread your original post, the very first option in that link looks like a better fit. To rephrase it somewhat for your case: 1) Create a repository or a directory in the repository 2) Create your local files 3) Check out the empty repository path to your workspace - this won't overwrite any of your files 4) svn add [files] 5) svn ci 6) Continue working as usual This avoids a round trip to the server to push the current files, then pull them back down to create the formal SVN working copy with things already in it - instead you "check out" an empty directory which should be quite fast. -kgd
Re: Can import also convert the source to a working copy
On Thu, 15 Mar 2018 12:03:53 +0100, Johan Corveleyn wrote: >> Is there some flag or such that can help out during the import or in a >> following checkout so that the extra directory >something else> does >> not need to be used? >> >> Or can I just move the .svn dir from the working copy to the original >> project and then it will be converted in place? > >See http://subversion.apache.org/faq.html#in-place-import Seems like the best option is as follows: - svn import WiFiConfig /WiFiConfig/trunk --depth files -m "msg" svn co WiFiConfig/trunk --force WiFiConfig I.e. First import the directory and then immediately check out the same with --force It still takes some time because I think svn needs to download the files into the cache in the .svn directory. I have a rather slow connection to the server from where I am... -- Bo Berglund Developer in Sweden
Re: Can import also convert the source to a working copy
On 15.03.2018 11:48, Bo Berglund wrote: > I have used this sequence for handling new projects with svn: > > - Start a new project in whatever IDE is used > - Work a bit on initial code so the framework is OK > - Exit the IDE > - Command prompt in the parent of the project dir > - svn import --depth files -m "message" > - rename > - svn co > - move \ \ > - delete > - start dev IDE again and hopefully find that it loads properly > > I want to avoid having to do all the steps following the svn import > command so I can just continue working where I was when I wanted to > put the project under version control. > Specifically there may be ignored files in the project dir that are > needed by the dev IDE but should not be versioned and I would like > these to be intact yet not part of the versioning. I have svn ignores > in my config file so they won't be part of the import and therefore > they will not appear after the following checkout... > > Is there some flag or such that can help out during the import or in a > following checkout so that the extra directory >something else> does > not need to be used? > > Or can I just move the .svn dir from the working copy to the original > project and then it will be converted in place? svn checkout --force -- Brane
Re: Can import also convert the source to a working copy
On Thu, Mar 15, 2018 at 11:48 AM, Bo Berglund wrote: > I have used this sequence for handling new projects with svn: > > - Start a new project in whatever IDE is used > - Work a bit on initial code so the framework is OK > - Exit the IDE > - Command prompt in the parent of the project dir > - svn import --depth files -m "message" > - rename > - svn co > - move \ \ > - delete > - start dev IDE again and hopefully find that it loads properly > > I want to avoid having to do all the steps following the svn import > command so I can just continue working where I was when I wanted to > put the project under version control. > Specifically there may be ignored files in the project dir that are > needed by the dev IDE but should not be versioned and I would like > these to be intact yet not part of the versioning. I have svn ignores > in my config file so they won't be part of the import and therefore > they will not appear after the following checkout... > > Is there some flag or such that can help out during the import or in a > following checkout so that the extra directory >something else> does > not need to be used? > > Or can I just move the .svn dir from the working copy to the original > project and then it will be converted in place? See http://subversion.apache.org/faq.html#in-place-import -- Johan
Can import also convert the source to a working copy
I have used this sequence for handling new projects with svn: - Start a new project in whatever IDE is used - Work a bit on initial code so the framework is OK - Exit the IDE - Command prompt in the parent of the project dir - svn import --depth files -m "message" - rename - svn co - move \ \ - delete - start dev IDE again and hopefully find that it loads properly I want to avoid having to do all the steps following the svn import command so I can just continue working where I was when I wanted to put the project under version control. Specifically there may be ignored files in the project dir that are needed by the dev IDE but should not be versioned and I would like these to be intact yet not part of the versioning. I have svn ignores in my config file so they won't be part of the import and therefore they will not appear after the following checkout... Is there some flag or such that can help out during the import or in a following checkout so that the extra directory >something else> does not need to be used? Or can I just move the .svn dir from the working copy to the original project and then it will be converted in place? -- Bo Berglund Developer in Sweden