[PATCH 1 of 2] backout f08df4d38442

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Dec 17 00:38:15 CST 2010


# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1291781683 21600
# Node ID de162b8e277bc8a942fd517dc852e868d085715a
# Parent  aae2d5cbde647da49fb1927d02faabfc37975c63
backout f08df4d38442

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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)
diff --git a/tests/test-mq-qrefresh.t b/tests/test-mq-qrefresh.t
--- a/tests/test-mq-qrefresh.t
+++ b/tests/test-mq-qrefresh.t
@@ -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 ..


More information about the Mercurial-devel mailing list