comparison sync.py @ 11:19a699305c29

better failure erroring
author drewp@bigasterisk.com
date Fri, 16 Jul 2021 00:32:43 -0700
parents 460a2cf8b22b
children f83b7426b97c
comparison
equal deleted inserted replaced
10:460a2cf8b22b 11:19a699305c29
69 ], 69 ],
70 check=False, 70 check=False,
71 capture_output=True, 71 capture_output=True,
72 cwd=self.projRoot, 72 cwd=self.projRoot,
73 env={'SSH_AUTH_SOCK': self.config['SSH_AUTH_SOCK']}) 73 env={'SSH_AUTH_SOCK': self.config['SSH_AUTH_SOCK']})
74 if not push.stdout.endswith(b'no changes found\n'): 74 if push.returncode != 0 and not push.stdout.endswith(b'no changes found\n'):
75 raise ValueError(f'hg push failed with {push.stdout!r}') 75 raise ValueError(f'hg push failed with {push.stdout!r}')
76 76
77 def getSshAuthSock(): 77 def getSshAuthSock():
78 keychain = subprocess.check_output([ 78 keychain = subprocess.check_output([
79 "keychain", "--noask", "--quiet", "--eval", "id_rsa"]).decode('ascii') 79 "keychain", "--noask", "--quiet", "--eval", "id_rsa"]).decode('ascii')