Mercurial y Clearcase, moviendo el repositorio existente a otra vista

We've been running out of a Mercurial repo from within a CC snapshot view successfully for some time now. We have the source repo on the view, and the team's base repo is a clone from that one. That keeps a layer of separation to make checkout-checkins in CC easier to manage.

Now, for reasons internal to where I work, we need to switch to a new view. How can we do this? There are other teams within the company checking in files directly to CC (hopefully we'll convince them away soon), so that should be a consideration.

How can I overlay our existing repo into a new view (and then I can rebase the team's base repo no problem)?

preguntado el 01 de febrero de 12 a las 14:02

1 Respuestas

The problem is the delta that might exist between your current Mercurial repo and the new snapshot view (especially with a different config spec).

Since the OP mentions in the comments that the config spec of the new view won't change, he suggest a simpler method than the one below:

  • Load the new snapshot view content
  • remove all its files from the disk (no from ClearCase)
  • copia el .hg directory of the original Mercurial repo in the new (empty) view
  • update the working tree of said Mercurial repo (all the files are back in their original place, but detected by ClearCase as hijacked)
  • cleartool update -overwrite in order to force ClearCase to erase those files by the versions from ClearCase. (see hombre cleartool update)

Mercurial would then detect any change between the files restored by ClearCase and the ones managed in the repo.


(Respuesta original)

Me gustaría:

  • create a branch dedicated for that migration in Mercurial,
  • compare its content with the snapshot view (without putting yet any Mercurial repo in it)
  • import and resolve the differences from the ClearCase view to the Mercurial repo
  • y luego, once the content is identical, clone the Mercurial repo directly within the snapshot view.

The rest would be about:

  • fetching that dedicated migration branch to the team's base repo
  • merging that branch to the main development branch within team's base repo

Respondido 01 Feb 12, 19:02

Thanks VonC. The config spec will be identical. What do you mean by "clone the Mercurial repo directly WITHIN the snapshot view"? I think I understand the rest... - de

@ale: cloning the Mercurial repo in the CC view would be one way to get the Mercurial repo back in the ClearCase view. But you could also copy the .hg directory itself directly in the CC view, that would work too. - VonC

I think I understand. I can just move off all the files from the view, and run the clone. It might think they are hijacked but contents should be fine because the previous step dealt with that. Next view update will deal with any new changes in CC that occurred while cloning. - de

@ale: that's one idea, yes. And then: stackoverflow.com/questions/5740826/… - VonC

@ale: I have included your option in a revised edition of my answer. - VonC

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.