Re: Merging two repositories?



Thank you, the pull-local approach has worked fine here :-)

On 8 June 2015 at 18:29, Dan Nicholson <nicholson endlessm com> wrote:
On Mon, Jun 8, 2015 at 8:09 AM, Leandro Santiago
<leandrosansilva gmail com> wrote:
Hello, let's suppose I have two different ostree repositories, repo1/
and repo2/. repo1 has a branch called version/1 and repo2 has a
version/2. Can I merge them using some tool like rsync?

Will it corrupt the repository internal structure?

I think so long as the refs are named differently, rsyncing one into
the other should work fine on archive-z2 repos.

In my case the trees are created without knowing the previous trees in
the repository, and my idea is "manually" merging the new repository
with the previous one. If it works, I will again manually create the
delta between the versions when required.

Based on a non-deep reading, ostree allows such approach, and I am
curently doing some experiments, but I would like to confirm there's
nothing wrong with the approach.

If it does not work, my idea is checking out the tree created in the
repo and commit it in a new one, eve though this process is very slow
for performing unneeded steps. (I am using rpm-ostree for building the
trees).

I think the best way to do this would be through pull-local, though.

ostree --repo=repo1 pull-local repo2 version2

One disadvantage of this approach, though, is that it only pulls the
latest commit. I have a patch to add a --depth option to pull-local so
you could add --depth=-1 for all commits, but it's against an older
version and I haven't forward ported it yet.

--
Dan



-- 
Sent from my mind


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]