Commits

Matthew Schinckel  committed 1d30d47

Fixes false positive on managed files, when the filename does not exist.

  • Participants
  • Parent commits 8b01103

Comments (0)

Files changed (1)

File hg_adapter.py

     child_stderr = p.stderr
     
     returnCode = p.wait()
-    data = child_stdout.read()
-
-    isManaged = (data.find("abort: ") == -1) and not data.startswith("?")
+    err = child_stderr.read()
+    out = child_stdout.read()
+    
+    isManaged = not len(err) and not out.startswith("?")
     
     if isManaged:
         returnCode = 0
     
-    returnDict = dict(isManaged=isManaged, returnCode=returnCode, stdErr=child_stderr.read())
+    returnDict = dict(isManaged=isManaged, returnCode=returnCode, stdErr=err)
     
     child_stdout.close()
     child_stderr.close()