##// END OF EJS Templates
merge with stable
Matt Mackall -
r14918:ebdfdba0 merge default
parent child Browse files
Show More
@@ -180,7 +180,7 b' def rebase(ui, repo, **opts):'
180 for rev in state:
180 for rev in state:
181 branches.add(repo[rev].branch())
181 branches.add(repo[rev].branch())
182 if len(branches) > 1:
182 if len(branches) > 1:
183 raise util.Abort(_('cannot collapse multiple named '
183 raise util.Abort(_('cannot collapse multiple named '
184 'branches'))
184 'branches'))
185
185
186
186
@@ -4156,9 +4156,11 b' def revert(ui, repo, *pats, **opts):'
4156 To cancel a merge (and lose your changes), use :hg:`update --clean .`.
4156 To cancel a merge (and lose your changes), use :hg:`update --clean .`.
4157
4157
4158 With no revision specified, revert the specified files or directories
4158 With no revision specified, revert the specified files or directories
4159 to the state they had in the first parent of the working directory.
4159 to the contents they had in the parent of the working directory.
4160 This restores the contents of files to an unmodified
4160 This restores the contents of files to an unmodified
4161 state and unschedules adds, removes, copies, and renames.
4161 state and unschedules adds, removes, copies, and renames. If the
4162 working directory has two parents, you must explicitly specify a
4163 revision.
4162
4164
4163 Using the -r/--rev or -d/--date options, revert the given files or
4165 Using the -r/--rev or -d/--date options, revert the given files or
4164 directories to their states as of a specific revision. Because
4166 directories to their states as of a specific revision. Because
@@ -4181,6 +4183,11 b' def revert(ui, repo, *pats, **opts):'
4181 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"])
4183 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"])
4182
4184
4183 parent, p2 = repo.dirstate.parents()
4185 parent, p2 = repo.dirstate.parents()
4186 if not opts.get('rev') and p2 != nullid:
4187 # revert after merge is a trap for new users (issue2915)
4188 raise util.Abort(_('uncommitted merge with no revision specified'),
4189 hint=_('use "hg update" or see "hg help revert"'))
4190
4184 ctx = scmutil.revsingle(repo, opts.get('rev'))
4191 ctx = scmutil.revsingle(repo, opts.get('rev'))
4185 node = ctx.node()
4192 node = ctx.node()
4186
4193
@@ -651,7 +651,7 b' def _dispatch(req):'
651 req.args = ['--repository', guess] + fullargs
651 req.args = ['--repository', guess] + fullargs
652 return _dispatch(req)
652 return _dispatch(req)
653 if not path:
653 if not path:
654 raise error.RepoError(_("no repository found in %r"
654 raise error.RepoError(_("no repository found in '%s'"
655 " (.hg not found)") % os.getcwd())
655 " (.hg not found)") % os.getcwd())
656 raise
656 raise
657 if repo:
657 if repo:
@@ -65,26 +65,27 b' def _pythonhook(ui, repo, name, hname, f'
65 '("%s" is not callable)') %
65 '("%s" is not callable)') %
66 (hname, funcname))
66 (hname, funcname))
67 try:
67 try:
68 # redirect IO descriptors the the ui descriptors so hooks that write
68 try:
69 # directly to these don't mess the command protocol when running through
69 # redirect IO descriptors the the ui descriptors so hooks
70 # the command server
70 # that write directly to these don't mess up the command
71 old = sys.stdout, sys.stderr, sys.stdin
71 # protocol when running through the command server
72 sys.stdout, sys.stderr, sys.stdin = ui.fout, ui.ferr, ui.fin
72 old = sys.stdout, sys.stderr, sys.stdin
73 sys.stdout, sys.stderr, sys.stdin = ui.fout, ui.ferr, ui.fin
73
74
74 r = obj(ui=ui, repo=repo, hooktype=name, **args)
75 r = obj(ui=ui, repo=repo, hooktype=name, **args)
75 except KeyboardInterrupt:
76 except KeyboardInterrupt:
76 raise
77 except Exception, exc:
78 if isinstance(exc, util.Abort):
79 ui.warn(_('error: %s hook failed: %s\n') %
80 (hname, exc.args[0]))
81 else:
82 ui.warn(_('error: %s hook raised an exception: '
83 '%s\n') % (hname, exc))
84 if throw:
85 raise
77 raise
86 ui.traceback()
78 except Exception, exc:
87 return True
79 if isinstance(exc, util.Abort):
80 ui.warn(_('error: %s hook failed: %s\n') %
81 (hname, exc.args[0]))
82 else:
83 ui.warn(_('error: %s hook raised an exception: '
84 '%s\n') % (hname, exc))
85 if throw:
86 raise
87 ui.traceback()
88 return True
88 finally:
89 finally:
89 sys.stdout, sys.stderr, sys.stdin = old
90 sys.stdout, sys.stderr, sys.stdin = old
90 if r:
91 if r:
@@ -1332,6 +1332,8 b' class url(object):'
1332 <url scheme: 'ssh', host: '[::1]', port: '2200', path: '/home/joe/repo'>
1332 <url scheme: 'ssh', host: '[::1]', port: '2200', path: '/home/joe/repo'>
1333 >>> url('file:///home/joe/repo')
1333 >>> url('file:///home/joe/repo')
1334 <url scheme: 'file', path: '/home/joe/repo'>
1334 <url scheme: 'file', path: '/home/joe/repo'>
1335 >>> url('file:///c:/temp/foo/')
1336 <url scheme: 'file', path: 'c:/temp/foo/'>
1335 >>> url('bundle:foo')
1337 >>> url('bundle:foo')
1336 <url scheme: 'bundle', path: 'foo'>
1338 <url scheme: 'bundle', path: 'foo'>
1337 >>> url('bundle://../foo')
1339 >>> url('bundle://../foo')
@@ -1421,7 +1423,7 b' class url(object):'
1421 path = None
1423 path = None
1422 if not self.host:
1424 if not self.host:
1423 self.host = None
1425 self.host = None
1424 if path:
1426 if path and not hasdriveletter(path):
1425 path = '/' + path
1427 path = '/' + path
1426
1428
1427 if self.host and '@' in self.host:
1429 if self.host and '@' in self.host:
@@ -59,8 +59,8 b' Should show a removed and b added:'
59 Revert should fail:
59 Revert should fail:
60
60
61 $ hg revert
61 $ hg revert
62 abort: no files or directories specified
62 abort: uncommitted merge with no revision specified
63 (uncommitted merge, use --all to discard all changes, or 'hg update -C .' to abort the merge)
63 (use "hg update" or see "hg help revert")
64 [255]
64 [255]
65
65
66 Revert should be ok now:
66 Revert should be ok now:
@@ -8,17 +8,17 b' Default encoding in tests is "ascii" and'
8 using the "replace" error handler:
8 using the "replace" error handler:
9
9
10 $ LANGUAGE=pt_BR hg tip
10 $ LANGUAGE=pt_BR hg tip
11 abortado: n?o foi encontrado um reposit?rio em '$TESTTMP' (.hg n?o encontrado)!
11 abortado: no repository found in '$TESTTMP' (.hg not found)!
12 [255]
12 [255]
13
13
14 Using a more accomodating encoding:
14 Using a more accomodating encoding:
15
15
16 $ HGENCODING=UTF-8 LANGUAGE=pt_BR hg tip
16 $ HGENCODING=UTF-8 LANGUAGE=pt_BR hg tip
17 abortado: n\xc3\xa3o foi encontrado um reposit\xc3\xb3rio em '$TESTTMP' (.hg n\xc3\xa3o encontrado)! (esc)
17 abortado: no repository found in '$TESTTMP' (.hg not found)!
18 [255]
18 [255]
19
19
20 Different encoding:
20 Different encoding:
21
21
22 $ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip
22 $ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip
23 abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc)
23 abortado: no repository found in '$TESTTMP' (.hg not found)!
24 [255]
24 [255]
General Comments 0
You need to be logged in to leave comments. Login now