English 中文(简体)
将文件夹从存储库迁移到另一个存储库,其中包含所有更改树数据
原标题:Migrate a folder from repository to another repository, with all the changes tree data

我在一个mercurial存储库中有一个文件夹,我想将其复制到另一个mercurial存储库,但我对该文件夹进行了所有更改,并且不会失去对该文件夹所做的所有版本控制。

这可能与水银有关吗?

问题回答

我认为,如果与该目录中的文件相关的变更集仅指代该目录下的文件,则可以使用hgexport/inport来实现这一点。首先识别这些文件的所有变更集,然后导出它们,然后导入它们。。。这里是shell脚本来完成第一部分:

for i in $(hg log -M --template="{node}
" directory)
do 
  hg export -r $i -o "$(date  +%Y%m%d%H%M%S )_%H"
done

然后将这些文件移动到新的repo中,并依次对每个文件进行hg导入。

如果您的变更集不包括其他文件,那么这将起作用。。。即便如此,您可能会发现很多拒绝,而且它不包括原始提交消息或合并变更集(显然)。





相关问题
Copy data from Access to SQL

I am in the process of migrating an existing Access database to a SQL database with a web front-end. I have successfully copied the database to SQL using the SQL Server Migration tool and am working ...

MongoMapper and migrations

I m building a Rails application using MongoDB as the back-end and MongoMapper as the ORM tool. Suppose in version 1, I define the following model: class SomeModel include MongoMapper::Document ...

Switching to WPF. Is it time?

I m considering switching from MFC to WPF. My first concern is that there are too many users who don t have .NET with WPF installed yet. Can anybody point to a source containing the WPF penetration ...

rake db:migrate running all migrations correctly

I m fairly new to Ruby on Rails here. I have 2 migrate files that were provided. The first one, prefixed with 001, creates a table and some columns for that table. The next migrate file, prefixed ...

Migrate Java Applet to what/where?

I am reviewing currently a medium size code base (around 30K LOC) which uses a huge Applet and interfaces with other systems. It s a tool to create custom labels, so we need drag-n-drop and other ...

热门标签