Jump to content

Child branch flattening issues on fast import


Recommended Posts

Did the fast export and fast import this weekend on our repositories. Everything seemed to go smoothing neither process showed any errors in our 22 repositories. In one repository we had two top level branches /Main and /newMain.

The /newMain branch contained the the same projects but it was created after we had done a massive code/product consolidation. The two distinct branches clearly defined what project setup the solutions contained.

Projects under the /main branch imported perfectly. Projects under the /newMain were flattened, by flattened I mean a branch that was /newMain/3.18.0 became /newMain-3.18.0. The /newMain-3.18.0 shows merge lines but is not a child of /newMain as it originally was. An image detailing the issue can be seen below

How can this be fixed or resolved? Why did the fast import cause this?

newMainBranchIssue.png

Link to comment
Share on other sites

Hi,

Ok, this is a naming issue. The fast export format cannot contain / in the branch name, so we have to replace them with "-".

We improved this behavior in version 4.1.0.242 so that these kind of branch names are handled correctly (i.e. as you describe). Importing the repository with this version will set the names correctly.

This version is part of the 4.1 series that is due to be released soon.

Cheers,

David

Link to comment
Share on other sites

So what choice do I have to fix now? The option to re-import is not possible had to do the import over the weekend so we did not lose working time. We use our code repository hourly and in 3 time zones. With out reimporting how do I get the items to be true branches and children and move forward?

We need to be able to set the parent of the branch once we do that we can rename it and make it like is should be. If we need to we can go to the SQL but would like the preferred and idea way to do this.

Link to comment
Share on other sites

Hi,

So what choice do I have to fix now? The option to re-import is not possible had to do the import over the weekend so we did not lose working time. We use our code repository hourly and in 3 time zones. With out reimporting how do I get the items to be true branches and children and move forward?

Actually there is no difference in Plastic SCM 4 between a "top level" branch and a "child" branch. They both start from a changeset. It is just about naming: they are "true" branches in any case.

We need to be able to set the parent of the branch once we do that we can rename it and make it like is should be. If we need to we can go to the SQL but would like the preferred and idea way to do this.

Well, I'm afraid the alternatives are:

  1. reimporting with 4.1.0.242 or newer.
  2. using the branches as they are since they will work exactly the same
  3. or setting the branch parent id to the object id of the parent branch directly in the database (now it will be set to -1) and then rename the child branch to remove the parent's name. (I suggest backing up the repository first)

Cheers,

David

Link to comment
Share on other sites

Ended up do the sql update because:

[*]using the branches as they are since they will work exactly the same

was not true, the branch did not have a parent couldn't be renamed and had various other issues.

reimporting with 4.1.0.242 or newer.

was not a option because there was no way mentioned to merge changes on the repository that had already been imported with a re-import from the old 3.0

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...