集市:如何将来自不同位置的文件放在一个存储库中? [英] Bazaar: how put files from different locations in one repository?
问题描述
我是集市的新手,想尝试一下,将我的Emacs配置文件存储在一个存储库中.
I'm new to bazaar and would like to give it a try by storing my Emacs configuration files in one repository.
这些文件由我的主目录(在unixish系统上)中的.emacs文件和/usr/local/share/emacs/site-lisp中的几个Emacs Lisp源文件组成
These files consist of a .emacs file in my home directory (on unixish systems) and a couple of Emacs Lisp source files in /usr/local/share/emacs/site-lisp
我真的很想拥有一个存储库,因为我的.emacs文件中的某些更改与其他文件中的更改一起出现了.
I'd really like to have one repo because some changes in my .emacs file go together with changes in other files.
我无法从手册中得出如何将这些文件放在一起的信息. "bzr init"递归地获取当前目录中的所有文件;对于我的情况,这意味着要在根目录中创建存储库...
What I couldn't work out from the manual is how to get these files together. The "bzr init" takes recursively all files from the current directory; for my situation this would mean to create the repo in the root directory...
您推荐什么?尝试使用符号链接吗?有没有一种方法可以将一个版本库中的修订版本与另一个版本库中的修订版本相关联,这样可以轻松解决拥有两个单独存储库的问题?
What do you recommend? Try working with symbolic links? Is there a way to associate a revision from one repo to one from another repo, so that easier solution of having two separate repos could be a way to go?
还有另一个挑战:在Windows机器上,这些Emacs文件位于完全不同的位置.该怎么治疗?
There is an additional challenge: on a Windows machine, these Emacs files sit on completely different locations. How to treat that?
我有一些perforce经验:解决方案很简单:您只需定义一个视图即可将回购文件映射到硬盘上的任意位置.
I have some perforce experience: there the solution is easy: you can just define a view that maps repo files to an arbitrary location on your hard disk.
推荐答案
这更像是一个bzr问题,但是我可以给你一个Emacs答案.
This is more of a bzr question, but I can give you an Emacs answer.
构造Emacs安装程序的新"方法是拥有目录~/.emacs.d
,并将所有内容放在其中.将您的.emacs
文件重命名为~/.emacs.d/init.el
,它将被自动找到.接下来,创建一个~/.emacs.d/lisp
目录(实际上,您可以根据需要命名该目录,但是lisp
是相当标准的),然后将/usr/local/share/emacs/site-lisp
文件的文件移动或复制到该目录(如果需要,可以字节编译)想要).最后,将(add-to-list 'load-path "~/.emacs.d/lisp")
放在~/.emacs/init.el
文件的顶部.
The "new" way to structure your Emacs setup is to have a directory ~/.emacs.d
and put everything under there. Rename your .emacs
file to ~/.emacs.d/init.el
and it will be found automatically. Next, create a ~/.emacs.d/lisp
directory (actually you can name the dir whatever you want, but lisp
is pretty standard), and move or copy the files the /usr/local/share/emacs/site-lisp
files to that dir (and byte-compile them if you want to). Finally, put (add-to-list 'load-path "~/.emacs.d/lisp")
at the top of your ~/.emacs/init.el
file.
现在所有内容都在一棵树下,因此bzr init
像往常一样.由于Emacs也可以在Windows上理解~
,因此该设置也可以在Windows上使用.
Now everything is under one tree, so bzr init
it as usual. This setup will work on Windows also since Emacs understands ~
on there as well.
这篇关于集市:如何将来自不同位置的文件放在一个存储库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!