comparison mercurial/commands.py @ 11063:eb23c876c111

tag: warn users about tag/branch possible name conflicts As reported recently, Mercurial users can easily find confusion when using a common name for a tag and a branch. It seems reasonable to warn them about this potential outcome, to avoid that "surprise". * Explain briefly the issue in "hg help tag" * Warn when tagging a revision
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Mon, 19 Apr 2010 17:41:12 +0900
parents 51d0387523c6
children 37d1b20168d1
comparison
equal deleted inserted replaced
11062:a2a6fd1064df 11063:eb23c876c111
3207 similarly to other project files and can be hand-edited if 3207 similarly to other project files and can be hand-edited if
3208 necessary. The file '.hg/localtags' is used for local tags (not 3208 necessary. The file '.hg/localtags' is used for local tags (not
3209 shared among repositories). 3209 shared among repositories).
3210 3210
3211 See :hg:`help dates` for a list of formats valid for -d/--date. 3211 See :hg:`help dates` for a list of formats valid for -d/--date.
3212
3213 Since tag names have priority over branch names during revision
3214 lookup, using an existing branch name as a tag name is discouraged.
3212 """ 3215 """
3213 3216
3214 rev_ = "." 3217 rev_ = "."
3215 names = (name1,) + names 3218 names = (name1,) + names
3216 if len(names) != len(set(names)): 3219 if len(names) != len(set(names)):