backout f08df4d38442
authorKevin Bullock <kbullock@ringworld.org>
Tue, 07 Dec 2010 22:14:43 -0600
changeset 13173 9b46dd253052
parent 13172 84cec5895d01
child 13174 be7e8e9bc5e5
backout f08df4d38442
hgext/mq.py
tests/test-mq-qrefresh.t
--- a/hgext/mq.py	Fri Dec 17 13:38:15 2010 +0100
+++ b/hgext/mq.py	Tue Dec 07 22:14:43 2010 -0600
@@ -1310,18 +1310,12 @@
             # local dirstate. in this case, we want them to only
             # show up in the added section
             for x in m:
-                if x == '.hgsub' or x == '.hgsubstate':
-                    self.ui.warn(_('warning: not refreshing %s\n') % x)
-                    continue
                 if x not in aa:
                     mm.add(x)
             # we might end up with files added by the local dirstate that
             # were deleted by the patch.  In this case, they should only
             # show up in the changed section.
             for x in a:
-                if x == '.hgsub' or x == '.hgsubstate':
-                    self.ui.warn(_('warning: not adding %s\n') % x)
-                    continue
                 if x in dd:
                     dd.remove(x)
                     mm.add(x)
@@ -1331,9 +1325,6 @@
             # are not in the add or change column of the patch
             forget = []
             for x in d + r:
-                if x == '.hgsub' or x == '.hgsubstate':
-                    self.ui.warn(_('warning: not removing %s\n') % x)
-                    continue
                 if x in aa:
                     aa.remove(x)
                     forget.append(x)
--- a/tests/test-mq-qrefresh.t	Fri Dec 17 13:38:15 2010 +0100
+++ b/tests/test-mq-qrefresh.t	Tue Dec 07 22:14:43 2010 -0600
@@ -487,74 +487,3 @@
 
   $ cd ..
 
-
-Issue2499: refuse to add .hgsub{,state} to a patch
-
-  $ hg init repo-2499
-  $ cd repo-2499
-  $ hg qinit
-  $ hg qnew -m 0 0.diff
-  $ echo a > a
-  $ hg init sub
-  $ cd sub
-  $ echo b > b
-  $ hg ci -Am 0sub
-  adding b
-  $ cd ..
-
-test when adding
-  $ echo sub = sub > .hgsub
-  $ echo `hg id -i --debug sub` sub > .hgsubstate
-  $ hg add
-  adding .hgsub
-  adding .hgsubstate
-  adding a
-  $ hg qrefresh
-  warning: not adding .hgsub
-  warning: not adding .hgsubstate
-  $ hg qfinish -a
-  $ hg status
-  A .hgsub
-  A .hgsubstate
-  $ hg forget .hgsubstate
-  $ rm .hgsubstate
-
-add subrepo with a real commit
-  $ hg ci -m 1
-  committing subrepository sub
-  $ hg qnew -m 2 2.diff
-
-test when modifying
-  $ echo sub2 = sub2 >> .hgsub
-  $ hg qrefresh
-  warning: not refreshing .hgsub
-  $ echo 0000000000000000000000000000000000000000 sub2 >> .hgsubstate
-  $ hg qrefresh
-  warning: not refreshing .hgsub
-  warning: not refreshing .hgsubstate
-  $ hg revert --no-backup .hgsub .hgsubstate
-
-test when removing
-  $ hg rm .hgsub
-  $ hg rm .hgsubstate
-  $ hg qrefresh
-  warning: not removing .hgsub
-  warning: not removing .hgsubstate
-  $ hg status
-  R .hgsub
-  R .hgsubstate
-  $ hg revert --no-backup .hgsub .hgsubstate
-
-test when deleting
-  $ rm .hgsub .hgsubstate
-  $ hg qrefresh
-  warning: not removing .hgsub
-  warning: not removing .hgsubstate
-  warning: subrepo spec file .hgsub not found
-  $ hg status
-  ! .hgsub
-  ! .hgsubstate
-  $ hg cat -r1 .hgsub > .hgsub
-  $ hg revert --no-backup .hgsubstate
-
-  $ cd ..