TortoiseHg error - [command returned code 255 ...]

pdavidson's Avatar

pdavidson

12 Nov, 2014 11:53 PM

I am trying to clone a repository via TortoiseHg.
I take paste the clone line into TortoiseHg
hg clone http://myusername@servername/hglab/hg/myslug/myreponame
and next receive the error message:
repository hg clone http://myusername@servername/hglab/hg/myslug/myreponame not found
[Code: 255]

A few things: When I paste the same line a cmd window, the clone happens as I would expect. no errors, all is well, I can make changes, committ, push them back up, etc...

I next added a .hgrc file as well as mercurial.ini file with [ui] and [auth] sections.
I know the cmd line version is using the .hgrc file because when I remove it, I am asked for a username and then a password.
When .hrgc is back in place in my c:\users\myusername folder then from the command line I leave off the user id.
e.g. with .hgrd in place I can use:
hg clone http://servername/hglab/hg/myslug/myreponame and everything works well.

I added the [auth] stuff to mercurial.ini to see if it made a difference but no good

Not a huge issue, but I'm surprised this hasn't been reported.
FWIW: This is not a public repository

  1. 1 Posted by pdavidson on 13 Nov, 2014 12:01 AM

    pdavidson's Avatar

    BTW - what is the difference between .hgrc and mercurial.ini in a windows setting of c:\users\myUsername

    Do we need them both?
    Are they read sequentially where last read has precedence, ala css files?

    Best practice is what?

  2. Support Staff 2 Posted by Anton Gogolev on 13 Nov, 2014 09:20 AM

    Anton Gogolev's Avatar

    Paul,

    You're just pasting the wrong thing and HgLab is a bit confusing here. To clone using TortoiseHg, you only need the URL part, i.e. everything after the hg clone substring:

    Cloning in TortoiseHg

    Storing passwords in plain-text anywhere is not exactly the best idea. There's an excellent extension called Keyring, which ships with TortoiseHg and which can be enabled from within TortoiseHg Workbench in File - Settings - Extensions by checking the "mercurial_keyring" checkbox.

    As for configuration files, they are very much like CSS, with more "specific" files overriding less "specific" ones. Here's a full list:

    • /.hg/hgrc (per-repository)
    • %USERPROFILE%.hgrc (per-user)
    • %USERPROFILE%\Mercurial.ini (per-user)
    • %HOME%.hgrc (per-user)
    • %HOME%\Mercurial.ini (per-user)
    • \Mercurial.ini (per-installation)
    • \hgrc.d*.rc (per-installation)
    • HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial (per-installation)

    Settings from earlier paths override later ones.

    There's no "best practice" -- everyone picks whatever works in their specific cases. For example, a System Administrator can tweak Mercurial settings (via Group Policy or somesuch) in the Registry, you can enable the extensions you use all the time in Mercurial.ini from your %USERPROFILE% and then you can fine-tune the settings on a per-repository basis.

  3. 3 Posted by pdavidson on 14 Nov, 2014 02:21 AM

    pdavidson's Avatar

    Well, I feel stupid. I must have stared at the documentation examples many times and modified that line in TortoiseHg over and over without cluing into the fact that it says Source

    Thanks for the keyring hint. I was considering a jump to AD to get around text passwords. Even if we are behind firewalls, bad idea. keyring is trivial to implement and very helpful.

  4. Support Staff 4 Posted by Anton Gogolev on 14 Nov, 2014 04:37 PM

    Anton Gogolev's Avatar

    Glad I could help!

  5. Anton Gogolev closed this discussion on 14 Nov, 2014 04:37 PM.

  6. pdavidson re-opened this discussion on 17 Nov, 2014 07:53 AM

  7. 5 Posted by pdavidson on 17 Nov, 2014 07:53 AM

    pdavidson's Avatar

    Anton:
    Regarding the per-user level usage of %USERPROFILE%\.hgrc vs %USERPROFILE%\Mercurial.ini
    I see the [auth] section that HgLab makes use of, does it matter if that is in mercurial.ini instead of .hgrc?
    I guess in other words, does HgLab search mercurial.ini for the [auth] section?

    In writing up a quick start for our coders, it would be easier to refer to dealing with just one ini file…
    Not a big deal but I am curious.
    Thanks

    - Paul Davidson
    GIS IT Lead
    (505) 768-2635 - Desk
    (505) 506-5960 - Cell

  8. Support Staff 6 Posted by Anton Gogolev on 28 Nov, 2014 09:23 AM

    Anton Gogolev's Avatar

    Paul,

    The .hgrc in %USERPROFILE% is there to mimic the way Unix/Linux software is
    configured (with so-called "dotfiles"), so unless your developers use both
    Windows and non-Windows platforms, there's no need to use .hgrc and a
    single INI file will do just fine.

    HgLab, being a server-side piece of software, can't possibly use any of the
    client-side configuration files. It can only use server-side hgrc files
    that are repository-specific to configure ACLs. See more here:

    https://hglabhq.com/documentation/user-guide/repositories#configuring-access-control

    To sum up, on Windows it's preferable to use Mercurial.ini in %USERPROFILE%
    to configure global per-user settings.

    On Monday, November 17, 2014, pdavidson <
    [email blocked]
    <javascript:_e(%7B%7D,'cvml','tender2%[email blocked]');>>
    wrote:

  9. 7 Posted by pdavidson on 28 Nov, 2014 06:12 PM

    pdavidson's Avatar

    Thanks
    I should have caught the server side issue.

    Sent from my iPhone

  10. Anton Gogolev closed this discussion on 03 Jan, 2015 08:54 AM.

  11. pdavidson re-opened this discussion on 03 Jan, 2015 08:55 AM

  12. 8 Posted by pdavidson on 03 Jan, 2015 08:55 AM

    pdavidson's Avatar

    I am out of the office until Jan 5th, 2015

    In the meantime, please contact:
    Bryan Ngyuen at
    [email blocked]
    (505) 289-3203
    or
    Michael Haley at
    [email blocked]
    (505) 289- 3204

    for all of your GIS IT or IR needs.

    Thank you
    Paul Davidson

  13. 9 Posted by pdavidson on 06 Jan, 2015 02:06 AM

    pdavidson's Avatar

    Anton:
    Please delete that re-opened email above and close the discussion again.
    I was out of country and had an auto-reply system going which clearly creates issues in this type of forum :-)

    Thanks

  14. Anton Gogolev closed this discussion on 06 Jan, 2015 04:31 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Sep, 2019 09:28 PM
21 Aug, 2019 09:07 AM
30 Jul, 2019 08:59 PM
31 May, 2019 02:29 PM
26 Nov, 2018 01:47 PM

 

16 Nov, 2018 07:51 PM
06 Nov, 2018 04:30 PM
24 Oct, 2018 07:57 AM
20 Jul, 2018 11:07 PM
05 Jul, 2018 10:53 AM
27 May, 2018 01:33 AM