Show More
@@ -5991,8 +5991,9 b' def resolve(ui, repo, *pats, **opts):' | |||
|
5991 | 5991 | Returns 0 on success, 1 if any files fail a resolve attempt. |
|
5992 | 5992 | """ |
|
5993 | 5993 | |
|
5994 | flaglist = 'all mark unmark list no_status'.split() | |
|
5994 | 5995 | all, mark, unmark, show, nostatus = \ |
|
5995 |
[opts.get(o) for o in |
|
|
5996 | [opts.get(o) for o in flaglist] | |
|
5996 | 5997 | |
|
5997 | 5998 | if (show and (mark or unmark)) or (mark and unmark): |
|
5998 | 5999 | raise error.Abort(_("too many options specified")) |
@@ -6121,7 +6122,22 b' def resolve(ui, repo, *pats, **opts):' | |||
|
6121 | 6122 | ms.recordactions() |
|
6122 | 6123 | |
|
6123 | 6124 | if not didwork and pats: |
|
6125 | hint = None | |
|
6126 | if not any([p for p in pats if p.find(':') >= 0]): | |
|
6127 | pats = ['path:%s' % p for p in pats] | |
|
6128 | m = scmutil.match(wctx, pats, opts) | |
|
6129 | for f in ms: | |
|
6130 | if not m(f): | |
|
6131 | continue | |
|
6132 | flags = ''.join(['-%s ' % o[0] for o in flaglist | |
|
6133 | if opts.get(o)]) | |
|
6134 | hint = _("(try: hg resolve %s%s)\n") % ( | |
|
6135 | flags, | |
|
6136 | ' '.join(pats)) | |
|
6137 | break | |
|
6124 | 6138 | ui.warn(_("arguments do not match paths that need resolving\n")) |
|
6139 | if hint: | |
|
6140 | ui.warn(hint) | |
|
6125 | 6141 | elif ms.mergedriver and ms.mdstate() != 's': |
|
6126 | 6142 | # run conclude step when either a driver-resolved file is requested |
|
6127 | 6143 | # or there are no driver-resolved files |
@@ -53,6 +53,34 b' resolving an unknown path should emit a ' | |||
|
53 | 53 | arguments do not match paths that need resolving |
|
54 | 54 | $ hg resolve -l does-not-exist |
|
55 | 55 | |
|
56 | tell users how they could have used resolve | |
|
57 | ||
|
58 | $ mkdir nested | |
|
59 | $ cd nested | |
|
60 | $ hg resolve -m file1 | |
|
61 | arguments do not match paths that need resolving | |
|
62 | (try: hg resolve -m path:file1) | |
|
63 | $ hg resolve -m file1 filez | |
|
64 | arguments do not match paths that need resolving | |
|
65 | (try: hg resolve -m path:file1 path:filez) | |
|
66 | $ hg resolve -m path:file1 path:filez | |
|
67 | $ hg resolve -l | |
|
68 | R file1 | |
|
69 | U file2 | |
|
70 | $ hg resolve -m filez file2 | |
|
71 | arguments do not match paths that need resolving | |
|
72 | (try: hg resolve -m path:filez path:file2) | |
|
73 | $ hg resolve -m path:filez path:file2 | |
|
74 | (no more unresolved files) | |
|
75 | $ hg resolve -l | |
|
76 | R file1 | |
|
77 | R file2 | |
|
78 | ||
|
79 | cleanup | |
|
80 | $ hg resolve -u | |
|
81 | $ cd .. | |
|
82 | $ rmdir nested | |
|
83 | ||
|
56 | 84 | don't allow marking or unmarking driver-resolved files |
|
57 | 85 | |
|
58 | 86 | $ cat > $TESTTMP/markdriver.py << EOF |
General Comments 0
You need to be logged in to leave comments.
Login now