What does mercury revision without a parent mean?

I have a Mercurial repository that is currently in a weird state. This is what looks like TortoiseHG:

Hg graph

I did not think it would be possible. Version 54 has the parent element "-1 (000000000000)" (i.e. Nothing). Obviously, something is still not understood about the Mercury, can anyone let me know what this means - and what had to happen in order to get into this state. As far as I know, this is just something pushed and pulled out of it - and no one used any crazy extensions.

In versions 54 and 55, tags are just added, but if I upgrade -C 'to version 54, I get ONLY the .hgtags file.

I made a clone from revision 53 to fix this. But I would better understand what happened here, so I can avoid it again.

+8
mercurial
source share
2 answers

When you look at the definition of a change set , you will see:

Each change set has zero, one or two parent change sets:

  • It has two parent changesets if the commit was a merge.
  • It does not have a parent if the change set is the root of the repository.
    There can be several roots in a repository (usually there is only one), each of which represents the beginning of a branch.

"Update" back to the changeset that already has a child, changing files and then committing creates a new child changeset, thus starting a new branch. Branches can be named.

So maybe this is what you did:

  • upgrade to 53 (which already had a child of "54")
  • change files
  • commit, thus starting a new branch with 54, without parent
    (this will make a second commit with the same parent)

or:

  • s 53 s --close-branch option ,
  • potentially new commit (without switching to another branch) may start a new

Ry4an (actual Mercurial specialist;)) calls and comments:

--close-branch does nothing but hide the branch from the list, and is canceled the next time you commit this branch. This will not create multiple roots.

VonC is right in his diagnosis, a few goals .
But no combination of " update " and " commit " will bring you to this state.
To get multiple roots, usually "TG44] is made from the repo and --force used to cancel the" unrelated repositories "warning.


(โ€œNo parentโ€ means that the parent identifiers are set to 00000, see โ€œBehind the Scenesโ€ :

alt text
(source: red-bean.com )
)

+7
source share

Another way to see this is if you did hg update null after committing rev. 53. For example, consider this sequence:

 hg init foo # create some files hg addremove hg commit -m "Revision 0" # edit, edit, edit hg commit -m "Revision 1" hg update null hg tag -m "Create tag v1.0.0.0" "v1.0.0.0" 

At this point, hg log display the parent version of version 2 as -1: 0000000000. Since hg update null clears the working directory, the only file in it will be .hgtags (just like you saw).

Did you have other tags before rev. 53? If my suspicions are true, they will not be present in your rev. 54 .hgtags .

+5
source share

All Articles