# HG changeset patch # User Matt Mackall # Date 1161727631 18000 # Node ID b28d3e0f9a8c3265fbf49900deb642e767a2efe4 # Parent 8dc14d630b29f406b4eb77ff578dbc1eafde6328 Deprecate old --branch/branches options diff -r 8dc14d630b29 -r b28d3e0f9a8c mercurial/commands.py --- a/mercurial/commands.py Tue Oct 24 16:49:36 2006 -0500 +++ b/mercurial/commands.py Tue Oct 24 17:07:11 2006 -0500 @@ -1588,6 +1588,8 @@ heads = repo.heads() br = None if opts['branches']: + ui.warn(_("the --branches option is deprecated, " + "please use 'hg branches' instead\n")) br = repo.branchlookup(heads) displayer = show_changeset(ui, repo, opts) for n in heads: @@ -1927,6 +1929,8 @@ 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 = [] @@ -2070,6 +2074,8 @@ br = None if branches is not None: + ui.warn(_("the --branches option is deprecated, " + "please use 'hg branches' instead\n")) br = repo.branchlookup(p) displayer = show_changeset(ui, repo, opts) for n in p: @@ -2697,6 +2703,8 @@ n = repo.changelog.tip() br = None if opts['branches']: + ui.warn(_("the --branches option is deprecated, " + "please use 'hg branches' instead\n")) br = repo.branchlookup([n]) show_changeset(ui, repo, opts).show(changenode=n, brinfo=br) if opts['patch']: @@ -2772,6 +2780,8 @@ def _lookup(repo, node, branch=None): if branch: + repo.ui.warn(_("the --branch option is deprecated, " + "please use 'hg branch' instead\n")) br = repo.branchlookup(branch=branch) found = [] for x in br: @@ -2984,7 +2994,7 @@ _('hg grep [OPTION]... PATTERN [FILE]...')), "heads": (heads, - [('b', 'branches', None, _('show branches')), + [('b', 'branches', None, _('show branches (DEPRECATED)')), ('', 'style', '', _('display using template map file')), ('r', 'rev', '', _('show only heads which are descendants of rev')), ('', 'template', '', _('display with template'))], @@ -2997,7 +3007,7 @@ _('directory strip option for patch. This has the same\n' 'meaning as the corresponding patch option')), ('m', 'message', '', _('use as commit message')), - ('b', 'base', '', _('base path')), + ('b', 'base', '', _('base path (DEPRECATED)')), ('f', 'force', None, _('skip check for outstanding uncommitted changes'))], _('hg import [-p NUM] [-b BASE] [-m MESSAGE] [-f] PATCH...')), @@ -3027,7 +3037,7 @@ _('hg locate [OPTION]... [PATTERN]...')), "^log|history": (log, - [('b', 'branches', None, _('show branches')), + [('b', 'branches', None, _('show branches (DEPRECATED)')), ('f', 'follow', None, _('follow changeset history, or file history across copies and renames')), ('', 'follow-first', None, @@ -3047,7 +3057,7 @@ "manifest": (manifest, [], _('hg manifest [REV]')), "merge": (merge, - [('b', 'branch', '', _('merge with head of a specific branch')), + [('b', 'branch', '', _('merge with head of a specific branch (DEPRECATED)')), ('f', 'force', None, _('force a merge with outstanding changes'))], _('hg merge [-b TAG] [-f] [REV]')), "outgoing|out": (outgoing, @@ -3063,7 +3073,7 @@ _('hg outgoing [-M] [-p] [-n] [-r REV]... [DEST]')), "^parents": (parents, - [('b', 'branches', None, _('show branches')), + [('b', 'branches', None, _('show branches (DEPRECATED)')), ('r', 'rev', '', _('show parents from the specified rev')), ('', 'style', '', _('display using template map file')), ('', 'template', '', _('display with template'))], @@ -3163,7 +3173,7 @@ "tags": (tags, [], _('hg tags')), "tip": (tip, - [('b', 'branches', None, _('show branches')), + [('b', 'branches', None, _('show branches (DEPRECATED)')), ('', 'style', '', _('display using template map file')), ('p', 'patch', None, _('show patch')), ('', 'template', '', _('display with template'))], @@ -3176,7 +3186,8 @@ "debugundo|undo": (undo, [], _('hg undo')), "^update|up|checkout|co": (update, - [('b', 'branch', '', _('checkout the head of a specific branch')), + [('b', 'branch', '', + _('checkout the head of a specific branch (DEPRECATED)')), ('m', 'merge', None, _('allow merging of branches (DEPRECATED)')), ('C', 'clean', None, _('overwrite locally modified files')), ('f', 'force', None, _('force a merge with outstanding changes'))], diff -r 8dc14d630b29 -r b28d3e0f9a8c tests/test-branch.out --- a/tests/test-branch.out Tue Oct 24 16:49:36 2006 -0500 +++ b/tests/test-branch.out Tue Oct 24 17:07:11 2006 -0500 @@ -1,11 +1,13 @@ adding a adding b 2 files updated, 0 files merged, 0 files removed, 0 files unresolved +the --branches option is deprecated, please use 'hg branches' instead changeset: 0:b544c4ac4389 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: 0 +the --branch option is deprecated, please use 'hg branch' instead Using head f4ac749470f2 for branch foo 2 files updated, 0 files merged, 0 files removed, 0 files unresolved changeset: 1:f4ac749470f2 @@ -17,9 +19,11 @@ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved adding c +the --branch option is deprecated, please use 'hg branch' instead Using head f4ac749470f2 for branch foo 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) +the --branches option is deprecated, please use 'hg branches' instead changeset: 2:1505d56ee00e tag: tip parent: 0:b544c4ac4389 @@ -36,9 +40,11 @@ 2 files updated, 0 files merged, 1 files removed, 0 files unresolved adding d +the --branch option is deprecated, please use 'hg branch' instead Using head f4ac749470f2 for branch foo 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) +the --branches option is deprecated, please use 'hg branches' instead changeset: 3:53b72df12ae5 tag: tip parent: 0:b544c4ac4389