##// END OF EJS Templates
merge with stable
Augie Fackler -
r36996:c4796926 merge default
parent child Browse files
Show More
@@ -32,6 +32,7 b' from . import ('
32 logcmdutil,
32 logcmdutil,
33 match as matchmod,
33 match as matchmod,
34 merge as mergemod,
34 merge as mergemod,
35 mergeutil,
35 obsolete,
36 obsolete,
36 patch,
37 patch,
37 pathutil,
38 pathutil,
@@ -2357,6 +2358,11 b' def amend(ui, repo, old, extra, pats, op'
2357 if subs:
2358 if subs:
2358 subrepoutil.writestate(repo, newsubstate)
2359 subrepoutil.writestate(repo, newsubstate)
2359
2360
2361 # avoid cycle (TODO: should be removed in default branch)
2362 from . import merge as mergemod
2363 ms = mergemod.mergestate.read(repo)
2364 mergeutil.checkunresolved(ms)
2365
2360 filestoamend = set(f for f in wctx.files() if matcher(f))
2366 filestoamend = set(f for f in wctx.files() if matcher(f))
2361
2367
2362 changes = (len(filestoamend) > 0)
2368 changes = (len(filestoamend) > 0)
@@ -8,6 +8,7 b''
8
8
9 from __future__ import absolute_import
9 from __future__ import absolute_import
10
10
11 import gc
11 import os
12 import os
12 import time
13 import time
13
14
@@ -357,8 +358,18 b' class hgwebdir(object):'
357 def run_wsgi(self, req, res):
358 def run_wsgi(self, req, res):
358 profile = self.ui.configbool('profiling', 'enabled')
359 profile = self.ui.configbool('profiling', 'enabled')
359 with profiling.profile(self.ui, enabled=profile):
360 with profiling.profile(self.ui, enabled=profile):
360 for r in self._runwsgi(req, res):
361 try:
361 yield r
362 for r in self._runwsgi(req, res):
363 yield r
364 finally:
365 # There are known cycles in localrepository that prevent
366 # those objects (and tons of held references) from being
367 # collected through normal refcounting. We mitigate those
368 # leaks by performing an explicit GC on every request.
369 # TODO remove this once leaks are fixed.
370 # TODO only run this on requests that create localrepository
371 # instances instead of every request.
372 gc.collect()
362
373
363 def _runwsgi(self, req, res):
374 def _runwsgi(self, req, res):
364 try:
375 try:
@@ -415,6 +415,23 b' Refuse to amend during a merge:'
415 [255]
415 [255]
416 $ hg ci -m 'merge'
416 $ hg ci -m 'merge'
417
417
418 Refuse to amend if there is a merge conflict (issue5805):
419
420 $ hg up -q foo
421 $ echo c > a
422 $ hg up default -t :fail
423 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
424 use 'hg resolve' to retry unresolved file merges
425 [1]
426 $ hg resolve -l
427 U a
428
429 $ hg ci --amend
430 abort: unresolved merge conflicts (see 'hg help resolve')
431 [255]
432
433 $ hg up -qC .
434
418 Follow copies/renames:
435 Follow copies/renames:
419
436
420 $ hg mv b c
437 $ hg mv b c
General Comments 0
You need to be logged in to leave comments. Login now