Merge with mpm
authorBrendan Cully <brendan@kublai.com>
Wed, 25 Oct 2006 17:09:22 -0700
changeset 3540 91d0fee3e684
parent 3539 a6dd7ab568cc (current diff)
parent 3522 c136c28a425a (diff)
child 3541 ee6b8de6df3c
Merge with mpm
tests/fish-merge
--- a/mercurial/commands.py	Wed Oct 25 16:35:35 2006 -0700
+++ b/mercurial/commands.py	Wed Oct 25 17:09:22 2006 -0700
@@ -563,6 +563,7 @@
     for title, options in option_lists:
         opt_output.append(("\n%s:\n" % title, None))
         for shortopt, longopt, default, desc in options:
+            if "DEPRECATED" in desc and not ui.verbose: continue
             opt_output.append(("%2s%s" % (shortopt and "-%s" % shortopt,
                                           longopt and " --%s" % longopt),
                                "%s%s" % (desc,
@@ -1390,24 +1391,6 @@
                  switch_parent=opts['switch_parent'],
                  opts=patch.diffopts(ui, opts))
 
-def forget(ui, repo, *pats, **opts):
-    """don't add the specified files on the next commit (DEPRECATED)
-
-    (DEPRECATED)
-    Undo an 'hg add' scheduled for the next commit.
-
-    This command is now deprecated and will be removed in a future
-    release. Please use revert instead.
-    """
-    ui.warn(_("(the forget command is deprecated; use revert instead)\n"))
-    forget = []
-    for src, abs, rel, exact in cmdutil.walk(repo, pats, opts):
-        if repo.dirstate.state(abs) == 'a':
-            forget.append(abs)
-            if ui.verbose or not exact:
-                ui.status(_('forgetting %s\n') % ((pats and rel) or abs))
-    repo.forget(forget)
-
 def grep(ui, repo, pattern, *pats, **opts):
     """search for a pattern in specified files and revisions
 
@@ -1856,6 +1839,10 @@
 
     changeiter, getchange, matchfn = walkchangerevs(ui, repo, pats, opts)
 
+    if opts['branches']:
+        ui.warn(_("the --branches option is deprecated, "
+                  "please use 'hg branches' instead\n"))
+
     if opts['limit']:
         try:
             limit = int(opts['limit'])
@@ -1932,8 +1919,6 @@
 
             br = None
             if opts['branches']:
-                ui.warn(_("the --branches option is deprecated, "
-                          "please use 'hg branches' instead\n"))
                 br = repo.branchlookup([repo.changelog.node(rev)])
 
             copies = []
@@ -2744,17 +2729,6 @@
                                    'bundle:' + fname)
     return postincoming(ui, repo, modheads, opts['update'])
 
-def undo(ui, repo):
-    """undo the last commit or pull (DEPRECATED)
-
-    (DEPRECATED)
-    This command is now deprecated and will be removed in a future
-    release. Please use the rollback command instead.  For usage
-    instructions, see the rollback command.
-    """
-    ui.warn(_('(the undo command is deprecated; use rollback instead)\n'))
-    repo.rollback()
-
 def update(ui, repo, node=None, merge=False, clean=False, force=None,
            branch=None):
     """update or merge working directory
@@ -2772,11 +2746,7 @@
     merging or discarding local changes.
     """
     node = _lookup(repo, node, branch)
-    if merge:
-        ui.warn(_('(the -m/--merge option is deprecated; '
-                  'use the merge command instead)\n'))
-        return hg.merge(repo, node, force=force)
-    elif clean:
+    if clean:
         return hg.clean(repo, node)
     else:
         return hg.update(repo, node)
@@ -2979,8 +2949,6 @@
           ('', 'nodates', None, _("don't include dates in diff headers")),
           ('', 'switch-parent', None, _('diff against the second parent'))],
          _('hg export [-a] [-o OUTFILESPEC] REV...')),
-    "debugforget|forget":
-        (forget, walkopts, _('hg forget [OPTION]... FILE...')),
     "grep":
         (grep,
          [('0', 'print0', None, _('end fields with NUL')),
@@ -3013,7 +2981,7 @@
           ('b', 'base', '', _('base path (DEPRECATED)')),
           ('f', 'force', None,
            _('skip check for outstanding uncommitted changes'))],
-         _('hg import [-p NUM] [-b BASE] [-m MESSAGE] [-f] PATCH...')),
+         _('hg import [-p NUM] [-m MESSAGE] [-f] PATCH...')),
     "incoming|in": (incoming,
          [('M', 'no-merges', None, _('do not show merges')),
           ('f', 'force', None,
@@ -3186,7 +3154,6 @@
          [('u', 'update', None,
            _('update to new tip if changesets were unbundled'))],
          _('hg unbundle [-u] FILE')),
-    "debugundo|undo": (undo, [], _('hg undo')),
     "^update|up|checkout|co":
         (update,
          [('b', 'branch', '',
@@ -3194,7 +3161,7 @@
           ('m', 'merge', None, _('allow merging of branches (DEPRECATED)')),
           ('C', 'clean', None, _('overwrite locally modified files')),
           ('f', 'force', None, _('force a merge with outstanding changes'))],
-         _('hg update [-m] [-C] [-f] [REV]')),
+         _('hg update [-C] [-f] [REV]')),
     "verify": (verify, [], _('hg verify')),
     "version": (show_version, [], _('hg version')),
 }
--- a/tests/fish-merge	Wed Oct 25 16:35:35 2006 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-#!/bin/sh
-
-set -e
-set -x
-
-# skip commit logs
-HGMERGE=tkmerge; export HGMERGE
-EDITOR=true; export EDITOR
-
-rm -rf m m1 m2
-mkdir m
-cd m
-
-echo "m     this  that"
-echo "this" > a
-echo "that" > b
-hg init
-hg addremove
-hg commit
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ..
-echo "m2    this  that "
-mkdir m2
-cd m2
-hg branch ../m
-hg checkout
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ../m
-echo "m     this1 that "
-echo "this1" > a
-hg commit
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ..
-echo "m1    this1 that "
-mkdir m1
-cd m1
-hg branch ../m
-hg checkout
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ../m1
-echo "m1    this1 that1"
-echo "that1" > b
-hg commit
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ../m2
-echo "m2    this  that2"
-echo "that2" > b
-hg commit
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ../m1
-echo "m1:m2 this1 that1 that2"
-hg merge ../m2 # b should conflict, a should be fine
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ../m2
-echo "m2    this2 that2"
-echo "this2" > a
-hg commit
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-cd ../m2
-echo "m2:m this12 that2"
-hg merge ../m # a should conflict, b should be fine
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
-
-# now here's the interesting bit
-# if we choose ancestor by file, no conflicts
-# otherwise we've got two equally close ancestors, each with a conflict
-# if we go back to the root, we'll have both conflicts again
-echo "m2:m1 this12 that12"
-hg merge ../m1 # should be clean
-echo "a:" `hg dump a` "b:" `hg dump b`
-echo
--- a/tests/test-debugcomplete.out	Wed Oct 25 16:35:35 2006 -0700
+++ b/tests/test-debugcomplete.out	Wed Oct 25 17:09:22 2006 -0700
@@ -61,7 +61,6 @@
 debugcomplete
 debugconfig
 debugdata
-debugforget
 debugindex
 debugindexdot
 debugrawcommit
@@ -69,7 +68,6 @@
 debugrename
 debugsetparents
 debugstate
-debugundo
 debugwalk
 
 % Do not show the alias of a debug command if there are other candidates