# HG changeset patch # User Idan Kamara # Date 1324573967 -7200 # Node ID 07efbd3bd09a199bc536e384ca15f492e8caa15d # Parent 0383fc37102b54870aac5b6586dec2767986f0f6 hglib: change init to not open a command server instance automatically diff -r 0383fc37102b -r 07efbd3bd09a hglib/__init__.py --- a/hglib/__init__.py Thu Dec 22 19:12:47 2011 +0200 +++ b/hglib/__init__.py Thu Dec 22 19:12:47 2011 +0200 @@ -19,4 +19,4 @@ if proc.returncode: raise error.CommandError(args, proc.returncode, out, err) - return open(dest, encoding, configs) + return client.hgclient(dest, encoding, configs, connect=False) diff -r 0383fc37102b -r 07efbd3bd09a tests/test-init.py --- a/tests/test-init.py Thu Dec 22 19:12:47 2011 +0200 +++ b/tests/test-init.py Thu Dec 22 19:12:47 2011 +0200 @@ -9,5 +9,5 @@ self.client = None shutil.rmtree('.hg') - self.client = hglib.init() + self.client = hglib.init().open() self.assertTrue(self.client.root().endswith('test_init'))