libvcs.cmd.hg#

For mercurial, aka hg(1).

class libvcs.cmd.hg.Hg(*, dir)#
Parameters:

dir (libvcs._internal.types.StrPath) –

clone(self, *, url, no_update=None, update_rev=None, rev=None, branch=None, ssh=None, remote_cmd=None, pull=None, stream=None, insecure=None)#

Clone a working copy from a mercurial repo.

Wraps hg clone.

Examples

>>> hg = Hg(dir=tmp_path)
>>> hg_remote_repo = create_hg_remote_repo()
>>> hg.clone(url=f'file://{hg_remote_repo}')
'updating to branch default...1 files updated, 0 files merged, ...'
>>> hg.dir.exists()
True
Parameters:
  • url (str) –

  • no_update (Optional[str]) –

  • update_rev (Optional[str]) –

  • rev (Optional[str]) –

  • branch (Optional[str]) –

  • ssh (Optional[str]) –

  • remote_cmd (Optional[str]) –

  • pull (Optional[bool]) –

  • stream (Optional[bool]) –

  • insecure (Optional[bool]) –

class libvcs.cmd.hg.HgColorType#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

always = always#
auto = auto#
boolean = boolean#
debug = debug#
never = never#
class libvcs.cmd.hg.HgPagerType#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

always = always#
auto = auto#
boolean = boolean#
never = never#