hg branches -a incorrect in mercurial 3.1.1

Mariska Hoogenboom M.Hoogenboom at nl.ccv.eu
Mon Dec 22 09:39:45 UTC 2014


Hi,

With mercurial 3.2.3 I also don't see the correct active branches if the repository is cloned with mercurial 3.1.1 from TeamCity with the unix line endings.  I currently can't test what will happen if I clone the repository from TeamCity with mercurial 3.2.3.

Note that the issue is not with the repository history, as we see this with every repository. Even if I make only one extra branch in a test repo, then close it, it will show the branch with "hg branches -a", if the repository was created with mercurial 3.1.1 from TeamCity.

What I do see in the erroneous repository (created by mercurial 3.1.1 from TeamCity 8.1), is that the file ".hg\cache\branch2-base" seems faulty.

d77b9b9c0f33ad3264a1a0012c31f4001cea6219 699
d77b9b9c0f33ad3264a1a0012c31f4001cea6219 o M1
bada6c9a70bb56b923ee28c1cdbbad67d8c17e22 o default

A good one shows a c on the closed branch:
d77b9b9c0f33ad3264a1a0012c31f4001cea6219 699
d77b9b9c0f33ad3264a1a0012c31f4001cea6219 c M1
bada6c9a70bb56b923ee28c1cdbbad67d8c17e22 o default

Apparently, tortoisehg itself does not use this "cache" file to retrieve the branch information. 

Anyone knows how this .hg\cache\branch2-base is created and why it could be that the closed branches are not correct in that file?

Met vriendelijke groet/Kind regards,

Mariska Hoogenboom


-----Original Message-----
From: Augie Fackler [mailto:raf at durin42.com] 
Sent: Friday, December 19, 2014 5:04 PM
To: Mariska Hoogenboom
Cc: Mercurial at selenic.com
Subject: Re: hg branches -a incorrect in mercurial 3.1.1


On Dec 19, 2014, at 3:51 AM, Mariska Hoogenboom <M.Hoogenboom at nl.ccv.eu> wrote:

> Hi all,
> 
> We've got an issue with "hg branches" showing incorrect branches if the cloned repository has "unix" line endings and mercurial 3.1.1. is used. 
> 
> The mercurial clones are created from TeamCity 8.1.5 with mercurial 3.1.1 on a Windows server. The -via TeamCity- cloned repositories have a unix-line endings format. When I check on TeamCity server with mercurial 3.1.1, the active branches information is incorrect. When I copy the clone to a machine with mercurial 2.8.1 (on linux or windows), the active branches information is correct again. 
> Note that Tortoisehg 3.1.1 on the same Windows server shows the active/closed branches correctly. But the with TortoiseHG shipped mercurial commandline, does not show the closed branches information correctly.
> 
> On Windows with mercurial 3.1.1
> 
> D:\Temp\test>hg branches -a
> M1                           699:d77b9b9c0f33
> default                      698:bada6c9a70bb
> 
> D:\Temp\test>hg branches -c
> M1                           699:d77b9b9c0f33
> default                      698:bada6c9a70bb
> 
> On linux with mercurial 2.8.1:
> 
> $ hg branches -a
> default                      698:bada6c9a70bb
> 
> $ hg branches -c
> default                      698:bada6c9a70bb
> M1                           699:d77b9b9c0f33 (closed)
> 
> On windows with mercurial 2.8.1:
> 
> D:\Temp\test>hg branches -a
> default                      698:bada6c9a70bb
> 
> D:\Temp\test>hg branches -c
> default                      698:bada6c9a70bb
> M1                           699:d77b9b9c0f33 (closed)
> 
> If I make a clone with mercurial 2.8.1. on linux, I can see the branches correctly on Windows with mercurial 3.1.1.
> Is there a solution besides downgrading mercurial?

Without knowing a lot more about your repository history, it's hard to know. Does Mercurial 3.2.3 solve the problem for you?




More information about the Mercurial mailing list