[issue2705] "hg st" and "hg di" give conflicting info after merge

Antoine Pitrou bugs at mercurial.selenic.com
Tue Mar 15 16:02:55 CDT 2011


New submission from Antoine Pitrou <pitrou at free.fr>:

This is probably not new (and perhaps even by design?), but "hg st" and "hg
di" giving different results after a merge is in daily work highly confusing:

$ hg st
M Include/patchlevel.h
M Lib/test/test_subprocess.py
$ hg di
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -591,9 +591,17 @@ class ProcessTestCase(BaseTestCase):
                 subprocess.Popen(['nonexisting_i_hope'],
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE)
+<<<<<<< local
             # ignore errors that indicate the command was not found
             if c.exception.errno not in (errno.ENOENT, errno.EACCES):
                 raise c.exception
+=======
+            # Windows raises IOError
+            except (IOError, OSError) as err:
+                # ignore errors that indicate the command was not found
+                if err.errno not in (errno.ENOENT, errno.EACCES):
+                    raise
+>>>>>>> other
 
     def test_issue8780(self):
         # Ensure that stdout is inherited from the parent


Specifying the rev doesn't improve things:

$ hg st --rev 3.2
M Include/patchlevel.h
M Lib/test/test_subprocess.py
$ hg di -r 3.2
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -591,9 +591,17 @@ class ProcessTestCase(BaseTestCase):
                 subprocess.Popen(['nonexisting_i_hope'],
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE)
+<<<<<<< local
             # ignore errors that indicate the command was not found
             if c.exception.errno not in (errno.ENOENT, errno.EACCES):
                 raise c.exception
+=======
+            # Windows raises IOError
+            except (IOError, OSError) as err:
+                # ignore errors that indicate the command was not found
+                if err.errno not in (errno.ENOENT, errno.EACCES):
+                    raise
+>>>>>>> other
 
     def test_issue8780(self):
         # Ensure that stdout is inherited from the parent

----------
messages: 15673
nosy: pitrou
priority: bug
status: unread
title: "hg st" and "hg di" give conflicting info after merge

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2705>
____________________________________________________


More information about the Mercurial-devel mailing list