D6315: automation: add check that hg source directory is a repo

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed May 15 11:46:37 EDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4274b1369b75: automation: add check that hg source directory is a repo (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6315?vs=14934&id=15093

REVISION DETAIL
  https://phab.mercurial-scm.org/D6315

AFFECTED FILES
  contrib/automation/hgautomation/windows.py

CHANGE DETAILS

diff --git a/contrib/automation/hgautomation/windows.py b/contrib/automation/hgautomation/windows.py
--- a/contrib/automation/hgautomation/windows.py
+++ b/contrib/automation/hgautomation/windows.py
@@ -156,6 +156,10 @@
             fh.write('  UserKnownHostsFile %s\n' % (ssh_dir / 'known_hosts'))
             fh.write('  IdentityFile %s\n' % (ssh_dir / 'id_rsa'))
 
+        if not (hg_repo / '.hg').is_dir():
+            raise Exception('%s is not a Mercurial repository; '
+                            'synchronization not yet supported' % hg_repo)
+
         env = dict(os.environ)
         env['HGPLAIN'] = '1'
         env['HGENCODING'] = 'utf-8'



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list