Storage format for remotenames.

Pulkit Goyal 7895pulkit at gmail.com
Mon Nov 6 07:34:42 EST 2017


Hey,

I am working on porting functionalities from hgremotenames extension
to core. The hgremotenames extensions pull the information about
remote branches and remote bookmarks and store them to provide a
better workflow.

The current storage format which hgremotenames has is having a file
`.hg/remotenames` in which each line is of the format `node nametype
name`, where
  - `node` refers to node where the remotename was last seen
  -  `nametype` refers whether it's a bookmark or branch
  - `name` consists of name of the remote and name of the remote bookmark/branch

At sprint, Ryan suggested to split the file according to bookmark and
branches so that we can read and write more easily which makes sense.

While working on the patches, I found out that if the name of the
remote contains a '/', then the current storage format is not good and
we can fail to parse things correctly.

Do you guys have any better ideas on how we can store remotenames?

Pulkit


More information about the Mercurial-devel mailing list