##// END OF EJS Templates
merge with stable
Yuya Nishihara -
r46030:4532e7eb merge default
parent child Browse files
Show More
@@ -46,6 +46,7 b' IGNORES = {'
46 # setuptools' pkg_resources.py expects "from __main__ import x" to
46 # setuptools' pkg_resources.py expects "from __main__ import x" to
47 # raise ImportError if x not defined
47 # raise ImportError if x not defined
48 '__main__',
48 '__main__',
49 '_ast', # https://bugs.python.org/issue41631
49 '_ssl', # conditional imports in the stdlib, issue1964
50 '_ssl', # conditional imports in the stdlib, issue1964
50 '_sre', # issue4920
51 '_sre', # issue4920
51 'rfc822',
52 'rfc822',
@@ -17,6 +17,7 b' from . import ('
17 node,
17 node,
18 patch,
18 patch,
19 pycompat,
19 pycompat,
20 scmutil,
20 smartset,
21 smartset,
21 )
22 )
22
23
@@ -90,7 +91,7 b' def filectxancestors(fctxs, followfirst='
90 visitheap = []
91 visitheap = []
91
92
92 def addvisit(fctx):
93 def addvisit(fctx):
93 rev = fctx.rev()
94 rev = scmutil.intrev(fctx)
94 if rev not in visit:
95 if rev not in visit:
95 visit[rev] = set()
96 visit[rev] = set()
96 heapq.heappush(visitheap, -rev) # max heap
97 heapq.heappush(visitheap, -rev) # max heap
@@ -753,7 +753,7 b' def _fileancestors(repo, revs, match, fo'
753 fcache = {}
753 fcache = {}
754
754
755 def filematcher(ctx):
755 def filematcher(ctx):
756 return scmutil.matchfiles(repo, fcache.get(ctx.rev(), []))
756 return scmutil.matchfiles(repo, fcache.get(scmutil.intrev(ctx), []))
757
757
758 def revgen():
758 def revgen():
759 for rev, cs in dagop.filectxancestors(fctxs, followfirst=followfirst):
759 for rev, cs in dagop.filectxancestors(fctxs, followfirst=followfirst):
@@ -62,6 +62,17 b' def pinnedrevs(repo):'
62 rev = cl.index.get_rev
62 rev = cl.index.get_rev
63 pinned.update(rev(t[0]) for t in tags.values())
63 pinned.update(rev(t[0]) for t in tags.values())
64 pinned.discard(None)
64 pinned.discard(None)
65
66 # Avoid cycle: mercurial.filemerge -> mercurial.templater ->
67 # mercurial.templatefuncs -> mercurial.revset -> mercurial.repoview ->
68 # mercurial.mergestate -> mercurial.filemerge
69 from . import mergestate
70
71 ms = mergestate.mergestate.read(repo)
72 if ms.active():
73 pinned.add(ms.localctx.rev())
74 pinned.add(ms.otherctx.rev())
75
65 return pinned
76 return pinned
66
77
67
78
@@ -2263,6 +2263,51 b' dirty:'
2263 }
2263 }
2264 ]
2264 ]
2265
2265
2266 follow files from wdir
2267
2268 $ hg cp d1/f1 f1-copy
2269 $ hg stat --all
2270 M d1/f1
2271 A d1/f2
2272 A f1-copy
2273 d1/f1
2274 R .d6/f1
2275 C D2/f1
2276 C D3.i/f1
2277 C d4.hg/f1
2278 C d5.d/f1
2279
2280 $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d5.d/f1
2281 == 2147483647 ==
2282
2283 == 0 ==
2284 d5.d/f1 | 1 +
2285 1 files changed, 1 insertions(+), 0 deletions(-)
2286
2287
2288 $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f1
2289 == 2147483647 ==
2290 d1/f1 | 1 +
2291 1 files changed, 1 insertions(+), 0 deletions(-)
2292
2293 == 0 ==
2294 d1/f1 | 1 +
2295 1 files changed, 1 insertions(+), 0 deletions(-)
2296
2297
2298 BROKEN: added file should exist in wdir
2299 $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f2
2300 abort: cannot follow nonexistent file: "d1/f2"
2301 [255]
2302
2303 BROKEN: copied file should exist in wdir
2304 $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat f1-copy
2305 abort: cannot follow nonexistent file: "f1-copy"
2306 [255]
2307
2308 $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat notfound
2309 notfound: $ENOENT$
2310
2266 $ hg revert -aqC
2311 $ hg revert -aqC
2267
2312
2268 Check that adding an arbitrary name shows up in log automatically
2313 Check that adding an arbitrary name shows up in log automatically
@@ -153,5 +153,29 b' Solve the conflict and go on:'
153 |/
153 |/
154 o 0:draft 'A'
154 o 0:draft 'A'
155
155
156 $ cat >> .hg/hgrc << EOF
157 > [experimental]
158 > evolution.createmarkers=True
159 > EOF
160
161 When updating away from a dirty, obsolete wdir, don't complain that the old p1
162 is filtered and requires --hidden.
163
164 $ echo conflict > A
165 $ hg debugobsolete 071d07019675449d53b7e312c65bcf28adbbdb64 965c486023dbfdc9c32c52dc249a231882fd5c17
166 1 new obsolescence markers
167 obsoleted 1 changesets
168 $ hg update -r 2 --config ui.merge=internal:merge --merge
169 merging A
170 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
171 1 files updated, 0 files merged, 1 files removed, 1 files unresolved
172 use 'hg resolve' to retry unresolved file merges
173 [1]
174 $ hg resolve A
175 merging A
176 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
177 [1]
178
179 $ hg up -C -q .
156
180
157 $ cd ..
181 $ cd ..
@@ -1795,6 +1795,8 b' rebasestate may contain hidden hashes. "'
1795 $ hg log -G
1795 $ hg log -G
1796 @ 2:b18e25de2cf5 D
1796 @ 2:b18e25de2cf5 D
1797 |
1797 |
1798 | % 1:2ec65233581b B (pruned using prune)
1799 |/
1798 o 0:426bada5c675 A
1800 o 0:426bada5c675 A
1799
1801
1800 $ hg summary
1802 $ hg summary
@@ -1802,8 +1804,8 b' rebasestate may contain hidden hashes. "'
1802 D
1804 D
1803 branch: default
1805 branch: default
1804 commit: 1 modified, 1 added, 1 unknown, 1 unresolved
1806 commit: 1 modified, 1 added, 1 unknown, 1 unresolved
1805 update: (current)
1807 update: 1 new changesets, 2 branch heads (merge)
1806 phases: 2 draft
1808 phases: 3 draft
1807 rebase: 0 rebased, 2 remaining (rebase --continue)
1809 rebase: 0 rebased, 2 remaining (rebase --continue)
1808
1810
1809 $ hg rebase --abort
1811 $ hg rebase --abort
General Comments 0
You need to be logged in to leave comments. Login now