changeset 12127:36a65283c3af

commit: sort subrepos before committing for stable test output
author Martin Geisler <mg@lazybytes.net>
date Tue, 31 Aug 2010 16:36:31 +0200
parents 779098953457
children 48735ce02345
files mercurial/localrepo.py tests/test-subrepo.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Aug 30 19:05:13 2010 +0900
+++ b/mercurial/localrepo.py	Tue Aug 31 16:36:31 2010 +0200
@@ -877,7 +877,7 @@
             # commit subs
             if subs or removedsubs:
                 state = wctx.substate.copy()
-                for s in subs:
+                for s in sorted(subs):
                     sub = wctx.sub(s)
                     self.ui.status(_('committing subrepository %s\n') %
                         subrepo.relpath(sub))
--- a/tests/test-subrepo.t	Mon Aug 30 19:05:13 2010 +0900
+++ b/tests/test-subrepo.t	Tue Aug 31 16:36:31 2010 +0200
@@ -499,8 +499,8 @@
   $ hg -R testdelete add
   adding testdelete/.hgsub
   $ hg -R testdelete ci -m "nested 1 & 2 added"
+  committing subrepository nested
   committing subrepository nested2
-  committing subrepository nested
   $ echo nested = nested > testdelete/.hgsub
   $ hg -R testdelete ci -m "nested 2 deleted"
   $ cat testdelete/.hgsubstate
@@ -529,8 +529,8 @@
   $ hg -R main add
   adding main/.hgsub
   $ hg -R main ci -m "add subrepos"
+  committing subrepository nested_absolute
   committing subrepository nested_relative
-  committing subrepository nested_absolute
   $ cd ..
   $ hg clone mercurial/main mercurial2/main
   updating to branch default