Bug #202

"Serve via HTTP" may show wrong port

Added by Chris Cannam almost 13 years ago. Updated over 12 years ago.

Status:ClosedStart date:2011-07-06
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:1.1

Description

Mithat Konar reports (this is already obliquely noted in the code, but not in the tracker):

Steps to make happen
1. In user's .hgrc set port number to something other than 8000:
[web]
port = 8080

2. Start EasyMercurial and issue Advanced > Serve via HTTP via menu bar.

Expected result
Dialog box says:
Running temporary server at 1 address(es):

http://192.168.1.101:<port number entered above>

Press Close to stop the server and return.

Observed result
Dialog box says
Running temporary server at 1 address(es):

http://192.168.1.101:8000

Press Close to stop the server and return.

History

#1 Updated by Chris Cannam over 12 years ago

  • Target version set to 1.1

#2 Updated by Chris Cannam over 12 years ago

It's surprisingly hard to do the actually right thing here -- we don't get the output from our hg command until it exits (without refactoring the command code) so we don't actually know what port it reported running on. In fact, the dialog displayed is totally oblivious to whether the hg server actually ran correctly or not!

However, we could certainly make it more likely to print the right result by first parsing out the port address from the hgrc, if supplied.

#3 Updated by Chris Cannam over 12 years ago

  • Status changed from New to Closed

Done in 49bddabad719. That will do for now.

Also available in: Atom PDF