##// END OF EJS Templates
merge with stable
Nicolas Dumazet -
r11644:c4f6f0a1 merge default
parent child Browse files
Show More
@@ -24,7 +24,7 b' hg.1.gendoc.txt: $(GENDOC)'
24 mv $@.tmp $@
24 mv $@.tmp $@
25
25
26 %: %.txt common.txt
26 %: %.txt common.txt
27 $(PYTHON) runrst manpage --halt warning \
27 $(PYTHON) runrst hgmanpage --halt warning \
28 --strip-elements-with-class htmlonly $*.txt $*
28 --strip-elements-with-class htmlonly $*.txt $*
29
29
30 %.html: %.txt common.txt
30 %.html: %.txt common.txt
@@ -303,7 +303,7 b' class Translator(nodes.NodeVisitor):'
303
303
304 def __init__(self, style):
304 def __init__(self, style):
305 self._style = style
305 self._style = style
306 if node.has_key('start'):
306 if 'start' in node:
307 self._cnt = node['start'] - 1
307 self._cnt = node['start'] - 1
308 else:
308 else:
309 self._cnt = 0
309 self._cnt = 0
@@ -345,7 +345,7 b' class Translator(nodes.NodeVisitor):'
345 def __repr__(self):
345 def __repr__(self):
346 return 'enum_style-%s' % list(self._style)
346 return 'enum_style-%s' % list(self._style)
347
347
348 if node.has_key('enumtype'):
348 if 'enumtype' in node:
349 self._list_char.append(enum_char(node['enumtype']))
349 self._list_char.append(enum_char(node['enumtype']))
350 else:
350 else:
351 self._list_char.append(enum_char('bullet'))
351 self._list_char.append(enum_char('bullet'))
@@ -218,8 +218,8 b' def reposetup(ui, repo):'
218 '''Parse .hg/bookmarks file and return a dictionary
218 '''Parse .hg/bookmarks file and return a dictionary
219
219
220 Bookmarks are stored as {HASH}\\s{NAME}\\n (localtags format) values
220 Bookmarks are stored as {HASH}\\s{NAME}\\n (localtags format) values
221 in the .hg/bookmarks file. They are read returned as a dictionary
221 in the .hg/bookmarks file.
222 with name => hash values.
222 Read the file and return a (name=>nodeid) dictionary
223 '''
223 '''
224 try:
224 try:
225 bookmarks = {}
225 bookmarks = {}
@@ -2418,6 +2418,18 b' def strip(ui, repo, rev, **opts):'
2418 elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)):
2418 elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)):
2419 update = False
2419 update = False
2420
2420
2421 q = repo.mq
2422 if q.applied:
2423 if rev == cl.ancestor(repo.lookup('qtip'), rev):
2424 q.applied_dirty = True
2425 start = 0
2426 end = len(q.applied)
2427 applied_list = [i.node for i in q.applied]
2428 if rev in applied_list:
2429 start = applied_list.index(rev)
2430 del q.applied[start:end]
2431 q.save_dirty()
2432
2421 repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force'])
2433 repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force'])
2422 return 0
2434 return 0
2423
2435
@@ -246,6 +246,15 b' class transplanter(object):'
246 m = match.exact(repo.root, '', files)
246 m = match.exact(repo.root, '', files)
247
247
248 n = repo.commit(message, user, date, extra=extra, match=m)
248 n = repo.commit(message, user, date, extra=extra, match=m)
249 if not n:
250 # Crash here to prevent an unclear crash later, in
251 # transplants.write(). This can happen if patch.patch()
252 # does nothing but claims success or if repo.status() fails
253 # to report changes done by patch.patch(). These both
254 # appear to be bugs in other parts of Mercurial, but dying
255 # here, as soon as we can detect the problem, is preferable
256 # to silently dropping changesets on the floor.
257 raise RuntimeError('nothing committed after transplant')
249 if not merge:
258 if not merge:
250 self.transplants.set(n, node)
259 self.transplants.set(n, node)
251
260
@@ -549,8 +549,6 b' def bundle(ui, repo, fname, dest=None, *'
549 Returns 0 on success, 1 if no changes found.
549 Returns 0 on success, 1 if no changes found.
550 """
550 """
551 revs = opts.get('rev') or None
551 revs = opts.get('rev') or None
552 if revs:
553 revs = [repo.lookup(rev) for rev in revs]
554 if opts.get('all'):
552 if opts.get('all'):
555 base = ['null']
553 base = ['null']
556 else:
554 else:
@@ -567,8 +565,9 b' def bundle(ui, repo, fname, dest=None, *'
567 for n in base:
565 for n in base:
568 has.update(repo.changelog.reachable(n))
566 has.update(repo.changelog.reachable(n))
569 if revs:
567 if revs:
570 visit = list(revs)
568 revs = [repo.lookup(rev) for rev in revs]
571 has.difference_update(revs)
569 visit = revs[:]
570 has.difference_update(visit)
572 else:
571 else:
573 visit = repo.changelog.heads()
572 visit = repo.changelog.heads()
574 seen = {}
573 seen = {}
@@ -588,6 +587,8 b' def bundle(ui, repo, fname, dest=None, *'
588 dest, branches = hg.parseurl(dest, opts.get('branch'))
587 dest, branches = hg.parseurl(dest, opts.get('branch'))
589 other = hg.repository(hg.remoteui(repo, opts), dest)
588 other = hg.repository(hg.remoteui(repo, opts), dest)
590 revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
589 revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
590 if revs:
591 revs = [repo.lookup(rev) for rev in revs]
591 o = discovery.findoutgoing(repo, other, force=opts.get('force'))
592 o = discovery.findoutgoing(repo, other, force=opts.get('force'))
592
593
593 if not o:
594 if not o:
@@ -42,7 +42,7 b' class localrepository(repo.repository):'
42 if not os.path.isdir(self.path):
42 if not os.path.isdir(self.path):
43 if create:
43 if create:
44 if not os.path.exists(path):
44 if not os.path.exists(path):
45 os.mkdir(path)
45 util.makedirs(path)
46 os.mkdir(self.path)
46 os.mkdir(self.path)
47 requirements = ["revlogv1"]
47 requirements = ["revlogv1"]
48 if self.ui.configbool('format', 'usestore', True):
48 if self.ui.configbool('format', 'usestore', True):
@@ -84,3 +84,6 b' for i in bundle file hg http https old-h'
84 test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
84 test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
85 done
85 done
86
86
87 echo "# creating 'local/sub/repo'"
88 hg init local/sub/repo
89 checknewrepo local/sub/repo
@@ -73,3 +73,9 b' ok'
73 ok
73 ok
74 # hg init "with space"
74 # hg init "with space"
75 ok
75 ok
76 # creating 'local/sub/repo'
77 store created
78 00changelog.i created
79 revlogv1
80 store
81 fncache
@@ -53,3 +53,19 b' hg parents'
53 hg strip 4 2>&1 | hidebackup
53 hg strip 4 2>&1 | hidebackup
54 echo % after strip of merge parent
54 echo % after strip of merge parent
55 hg parents
55 hg parents
56
57 #strip of applied mq should cleanup status file
58 hg up -C 3
59 echo fooagain >> bar
60 hg ci -mf
61 hg qimport -r tip:2
62 echo % applied patches before strip
63 hg qapplied
64 echo % stripping revision in queue
65 hg strip 3 | hidebackup
66 echo % applied patches after stripping rev in queue
67 hg qapplied
68 echo % stripping ancestor of queue
69 hg strip 1 | hidebackup
70 echo % applied patches after stripping ancestor of queue
71 hg qapplied
@@ -165,3 +165,17 b' user: test'
165 date: Thu Jan 01 00:00:00 1970 +0000
165 date: Thu Jan 01 00:00:00 1970 +0000
166 summary: b
166 summary: b
167
167
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 % applied patches before strip
170 2.diff
171 3.diff
172 4.diff
173 % stripping revision in queue
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 saved backup bundle to
176 % applied patches after stripping rev in queue
177 2.diff
178 % stripping ancestor of queue
179 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
180 saved backup bundle to
181 % applied patches after stripping ancestor of queue
@@ -400,15 +400,13 b' 2 bar qtip tip'
400 popping bar
400 popping bar
401 now at: foo
401 now at: foo
402 changeset: 0:cb9a9f314b8b
402 changeset: 0:cb9a9f314b8b
403 mq status file refers to unknown node
404 tag: tip
403 tag: tip
405 user: test
404 user: test
406 date: Thu Jan 01 00:00:00 1970 +0000
405 date: Thu Jan 01 00:00:00 1970 +0000
407 summary: a
406 summary: a
408
407
409 mq status file refers to unknown node
410 default 0:cb9a9f314b8b
408 default 0:cb9a9f314b8b
411 abort: trying to pop unknown node
409 no patches applied
412 new file
410 new file
413
411
414 diff --git a/new b/new
412 diff --git a/new b/new
General Comments 0
You need to be logged in to leave comments. Login now