This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf1a0933ce59e: config: replace a for-else by any() (authored 
by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1994?vs=5118&id=5141

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1657,10 +1657,7 @@
         else:
             paths = rcutil.userrcpath()
 
-        for f in paths:
-            if os.path.exists(f):
-                break
-        else:
+        if not any(os.path.exists(f) for f in paths):
             if opts.get('global'):
                 samplehgrc = uimod.samplehgrcs['global']
             elif opts.get('local'):



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to