Thread: [Vim-latex-devel] Can I clone just the vimfiles directory?
Brought to you by:
srinathava,
tmaas
From: Jeremy C. <jlc...@gm...> - 2011-03-07 03:15:32
|
I would like to stay abreast of the latest changes in vim-latex. That is, I would like my vimfiles to be current with what is available in the repository. I know the repository was recently changed from subversion to git. In subversion I could just checkout the vimfiles directory into my ~/.vim directory. I'm not sure how to do this with git. Is it possible to clone only the vimfiles directory ? Thanks, Jeremy |
From: Ted P. <te...@te...> - 2011-03-07 19:37:40
|
There is a recent thread that is very similar to this. Look for the subject "Merging vim-latex/master:vimfiles into local repo" from Feburary 17 of this year. A key difference between DVCS (all of them) and subversion is that the change history is associated with an entire project and not with particular files or subdirectories, like you have in subversion. When designing the structure of the DVCS repository up front, there are ways to create "subrepositories" inside directories that can be treated in a similar way (i.e., instead of cloning "vim-latex" you clone "vim-latex-vimfiles" which is otherwise parked inside the "vimfiles" directory inside "vim-latex"), but that requires setting things up ahead of time. In that thread mentioned above, Till seems happy with splitting the vim-latex web and vimfiles into two separate projects. That would solve the problem. However, it was unresolved as to whether it would be better to generate two new repositories (e.g., with hg convert) with new changeset id's, or generate one totally new repository and just mutate the directory structure in the old repository to maintain the old change history. So it's possible in the future (near future?) the vim-latex repo will look very different and it may be possible to do more exciting things (like using a "hg pull" to pull the unrelated repository into your own vimfiles repository, and then merging your repo with the Mercurial repo). Meanwhile, it may be better to create your clone elsewhere and then use rsync to update files in your home directory. For example, from the vimfiles directory inside the vim-latex repo, you can do: make -f Makefile.in install and it will execute: rsync -CrtW "--exclude='*~' --exclude='*.swp' --exclude='makefile'" . ~/.vim which will copy any new vim-latex/vimfiles changes into ~/.vim. --Ted On 03/06/2011 10:15 PM, Jeremy Conlin wrote: > I would like to stay abreast of the latest changes in vim-latex. That > is, I would like my vimfiles to be current with what is available in > the repository. I know the repository was recently changed from > subversion to git. In subversion I could just checkout the vimfiles > directory into my ~/.vim directory. I'm not sure how to do this with > git. > > Is it possible to clone only the vimfiles directory ? -- Ted Pavlic <te...@te...> |
From: Till M. <ope...@ti...> - 2011-03-07 22:20:57
|
On Mon, Mar 07, 2011 at 02:37:30PM -0500, Ted Pavlic wrote: > So it's possible in the future (near future?) the vim-latex repo will > look very different and it may be possible to do more exciting things Yes, I hope to get to this in the near future. > which will copy any new vim-latex/vimfiles changes into ~/.vim. Minimal testing showed me that it is also possible to clone the git repository somewhere outside the vim-directory and symlink to the vimfiles subdirectory inside the git repository from ~/.vim: $ cd $HOME $ git clone git://vim-latex.git.sourceforge.net/gitroot/vim-latex/vim-latex $ mv .vim .vim_old $ ln -s vim-latex/vimfiles/ .vim With git 1.7.4 on Fedora I can also use git commands inside ~/.vim. Regards Till |
From: Jeremy C. <jlc...@gm...> - 2011-03-07 22:23:50
|
On Mon, Mar 7, 2011 at 3:20 PM, Till Maas <ope...@ti...> wrote: > On Mon, Mar 07, 2011 at 02:37:30PM -0500, Ted Pavlic wrote: > >> So it's possible in the future (near future?) the vim-latex repo will >> look very different and it may be possible to do more exciting things > > Yes, I hope to get to this in the near future. > >> which will copy any new vim-latex/vimfiles changes into ~/.vim. > > Minimal testing showed me that it is also possible to clone the git > repository somewhere outside the vim-directory and symlink to the > vimfiles subdirectory inside the git repository from ~/.vim: > > $ cd $HOME > $ git clone git://vim-latex.git.sourceforge.net/gitroot/vim-latex/vim-latex > $ mv .vim .vim_old > $ ln -s vim-latex/vimfiles/ .vim This works fine unless I have other customization files (which I do) which reside in .vim. Thanks again, Jeremy |
From: Till M. <ope...@ti...> - 2011-03-08 19:10:51
|
On Mon, Mar 07, 2011 at 03:23:44PM -0700, Jeremy Conlin wrote: > On Mon, Mar 7, 2011 at 3:20 PM, Till Maas <ope...@ti...> wrote: > > $ cd $HOME > > $ git clone git://vim-latex.git.sourceforge.net/gitroot/vim-latex/vim-latex > > $ mv .vim .vim_old > > $ ln -s vim-latex/vimfiles/ .vim > > This works fine unless I have other customization files (which I do) > which reside in .vim. You have the same problem with subversion or am I missing something? Regards Till |
From: Ted P. <te...@te...> - 2011-03-08 19:18:27
|
>> This works fine unless I have other customization files (which I do) >> which reside in .vim. > > You have the same problem with subversion or am I missing something? Isn't it the case that in SVN, you can checkout (as opposed to clone or pull) a subdirectory on top of an existing directory? That way you could have non-managed files in the directory, and only the managed ones would get updated. --Ted -- Ted Pavlic <te...@te...> |
From: Jeremy C. <jlc...@gm...> - 2011-03-08 20:23:04
|
On Tue, Mar 8, 2011 at 12:18 PM, Ted Pavlic <te...@te...> wrote: >>> This works fine unless I have other customization files (which I do) >>> which reside in .vim. >> >> You have the same problem with subversion or am I missing something? > > Isn't it the case that in SVN, you can checkout (as opposed to clone or > pull) a subdirectory on top of an existing directory? That way you could > have non-managed files in the directory, and only the managed ones would > get updated. > > With Subversion, you can have unversioned files inside of a versioned directory. When updating to the latest files in the repository, the unversioned files were untouched. I would hope this would be the same with git. Otherwise, this whole idea of keeping my ~/.vim updated to the vim-latex/vimfiles is a moot point. Jeremy |
From: Ted P. <te...@te...> - 2011-03-08 20:32:46
|
> With Subversion, you can have unversioned files inside of a versioned > directory. When updating to the latest files in the repository, the > unversioned files were untouched. I would hope this would be the same > with git. Otherwise, this whole idea of keeping my ~/.vim updated to > the vim-latex/vimfiles is a moot point. In git (as with all DVCS), versioning exists at the project level and not the file level. You could certainly put unmanaged files within a git repository and never add them to the change history, but the first time you do something like 'git reset --hard' (or a similar checkout), the files you added would be in danger of being removed by git. The ideal situation would be to manage your ~/.vim directory in git and then merge a vimfiles repository from vim-latex into your .vim directory. That way you could pull vim-latex updates into your change history and then merge them ("git pull" provides a way to automate fetching and merging). Unfortunately, with the git repo having a vimfiles /subdirectory/, it is a little more complicated. It's possible that a local changeset on your side that moves everything from /vimfiles/ into the root directory and then gets rid of the web files might do the trick. That is, the merge with your local history should (I think?) "re-move" and "re-delete" every time. It's worth a shot (in a test ~/.vim directory), but it would be much easier if the vim-latex git repo looked like a vimfiles directory. --Ted -- Ted Pavlic <te...@te...> |
From: Ted P. <te...@te...> - 2011-03-07 22:54:01
|
> It looks like you can edit $GIT_DIR/info/sparse-checkouts to specify > things that you don't want. You need to turn on core.sparseCheckout > (e.g., in your .gitconfig) to turn this feature on though. I verified this... "works"... In .gitconfig: [core] sparseCheckout=1 Then: $ cd $HOME $ git clone git://vim-latex.git.sourceforge.net/gitroot/vim-latex/vim-latex $ echo vimfiles > vim-latex/.git/info/sparse-checkout $ cd vim-latex $ git reset --hard $ ls # only vimfiles and .git show That's not quite like what you'd expect from SVN, but maybe you can do something with that... -- Ted Pavlic <te...@te...> |
From: Jeremy C. <jlc...@gm...> - 2011-03-07 22:22:57
|
On Mon, Mar 7, 2011 at 12:37 PM, Ted Pavlic <te...@te...> wrote: > There is a recent thread that is very similar to this. Look for the subject > "Merging vim-latex/master:vimfiles into local repo" from Feburary 17 of this > year. > > A key difference between DVCS (all of them) and subversion is that the > change history is associated with an entire project and not with particular > files or subdirectories, like you have in subversion. When designing the > structure of the DVCS repository up front, there are ways to create > "subrepositories" inside directories that can be treated in a similar way > (i.e., instead of cloning "vim-latex" you clone "vim-latex-vimfiles" which > is otherwise parked inside the "vimfiles" directory inside "vim-latex"), but > that requires setting things up ahead of time. > > In that thread mentioned above, Till seems happy with splitting the > vim-latex web and vimfiles into two separate projects. That would solve the > problem. However, it was unresolved as to whether it would be better to > generate two new repositories (e.g., with hg convert) with new changeset > id's, or generate one totally new repository and just mutate the directory > structure in the old repository to maintain the old change history. > > So it's possible in the future (near future?) the vim-latex repo will look > very different and it may be possible to do more exciting things (like using > a "hg pull" to pull the unrelated repository into your own vimfiles > repository, and then merging your repo with the Mercurial repo). Meanwhile, > it may be better to create your clone elsewhere and then use rsync to update > files in your home directory. For example, from the vimfiles directory > inside the vim-latex repo, you can do: > > make -f Makefile.in install > > and it will execute: > > rsync -CrtW "--exclude='*~' --exclude='*.swp' --exclude='makefile'" . ~/.vim > > which will copy any new vim-latex/vimfiles changes into ~/.vim. > > --Ted > > > On 03/06/2011 10:15 PM, Jeremy Conlin wrote: >> >> I would like to stay abreast of the latest changes in vim-latex. That >> is, I would like my vimfiles to be current with what is available in >> the repository. I know the repository was recently changed from >> subversion to git. In subversion I could just checkout the vimfiles >> directory into my ~/.vim directory. I'm not sure how to do this with >> git. >> >> Is it possible to clone only the vimfiles directory ? Thanks for the information. I looked at the previous discussion and think I will just wait until the repository is separated or subrepository is "activated". In the meantime, I can be content to just "make" vim-latex to get the latest files. Jeremy |
From: Till M. <ope...@ti...> - 2011-09-02 23:31:45
|
On Mon, Mar 07, 2011 at 03:22:50PM -0700, Jeremy Conlin wrote: > Thanks for the information. I looked at the previous discussion and > think I will just wait until the repository is separated or > subrepository is "activated". In the meantime, I can be content to > just "make" vim-latex to get the latest files. There is now a single vimfiles repository: http://vim-latex.git.sourceforge.net/git/gitweb.cgi?p=vim-latex/vimfiles;a=summary The old git repository won't be updated anymore. Regards Till |
From: Ted P. <te...@te...> - 2011-09-07 19:06:03
|
> There is now a single vimfiles repository: > http://vim-latex.git.sourceforge.net/git/gitweb.cgi?p=vim-latex/vimfiles;a=summary > > The old git repository won't be updated anymore. That's a positive development. Having said that, it would be nice if vim-latex would bundle itself into a single folder that could be cloned from _within_ ~/.vim. That way you don't have to merge files from different distributions inside one .vim. I think the biggest challenge to this is the silly way that Vim organizes the ~/.vim folder, but maybe there's a way to load everything into one ~/.vim subfolder and then use a bundled VimBall to install a couple of minor files that hook-up Vim to the rest of the controlled repo. (something to keep in mind is that Windows now supports symlinks, and so it might be possible to leverage symlinks on all platforms to simplify this install process) --Ted -- Ted Pavlic <te...@te...> |