##// END OF EJS Templates
commit: note new branch heads rather than topological heads...
Matt Mackall -
r11173:5b48d819 default
parent child Browse files
Show More
@@ -1,3952 +1,3951 b''
1 1 # commands.py - command processing for mercurial
2 2 #
3 3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from node import hex, nullid, nullrev, short
9 9 from lock import release
10 10 from i18n import _, gettext
11 11 import os, re, sys, difflib, time, tempfile
12 12 import hg, util, revlog, bundlerepo, extensions, copies, error
13 13 import patch, help, mdiff, url, encoding, templatekw
14 14 import archival, changegroup, cmdutil, sshserver, hbisect, hgweb, hgweb.server
15 15 import merge as mergemod
16 16 import minirst
17 17
18 18 # Commands start here, listed alphabetically
19 19
20 20 def add(ui, repo, *pats, **opts):
21 21 """add the specified files on the next commit
22 22
23 23 Schedule files to be version controlled and added to the
24 24 repository.
25 25
26 26 The files will be added to the repository at the next commit. To
27 27 undo an add before that, see hg forget.
28 28
29 29 If no names are given, add all files to the repository.
30 30
31 31 .. container:: verbose
32 32
33 33 An example showing how new (unknown) files are added
34 34 automatically by :hg:`add`::
35 35
36 36 $ ls
37 37 foo.c
38 38 $ hg status
39 39 ? foo.c
40 40 $ hg add
41 41 adding foo.c
42 42 $ hg status
43 43 A foo.c
44 44 """
45 45
46 46 bad = []
47 47 names = []
48 48 m = cmdutil.match(repo, pats, opts)
49 49 oldbad = m.bad
50 50 m.bad = lambda x, y: bad.append(x) or oldbad(x, y)
51 51
52 52 for f in repo.walk(m):
53 53 exact = m.exact(f)
54 54 if exact or f not in repo.dirstate:
55 55 names.append(f)
56 56 if ui.verbose or not exact:
57 57 ui.status(_('adding %s\n') % m.rel(f))
58 58 if not opts.get('dry_run'):
59 59 bad += [f for f in repo.add(names) if f in m.files()]
60 60 return bad and 1 or 0
61 61
62 62 def addremove(ui, repo, *pats, **opts):
63 63 """add all new files, delete all missing files
64 64
65 65 Add all new files and remove all missing files from the
66 66 repository.
67 67
68 68 New files are ignored if they match any of the patterns in
69 69 .hgignore. As with add, these changes take effect at the next
70 70 commit.
71 71
72 72 Use the -s/--similarity option to detect renamed files. With a
73 73 parameter greater than 0, this compares every removed file with
74 74 every added file and records those similar enough as renames. This
75 75 option takes a percentage between 0 (disabled) and 100 (files must
76 76 be identical) as its parameter. Detecting renamed files this way
77 77 can be expensive.
78 78 """
79 79 try:
80 80 sim = float(opts.get('similarity') or 0)
81 81 except ValueError:
82 82 raise util.Abort(_('similarity must be a number'))
83 83 if sim < 0 or sim > 100:
84 84 raise util.Abort(_('similarity must be between 0 and 100'))
85 85 return cmdutil.addremove(repo, pats, opts, similarity=sim / 100.0)
86 86
87 87 def annotate(ui, repo, *pats, **opts):
88 88 """show changeset information by line for each file
89 89
90 90 List changes in files, showing the revision id responsible for
91 91 each line
92 92
93 93 This command is useful for discovering when a change was made and
94 94 by whom.
95 95
96 96 Without the -a/--text option, annotate will avoid processing files
97 97 it detects as binary. With -a, annotate will annotate the file
98 98 anyway, although the results will probably be neither useful
99 99 nor desirable.
100 100 """
101 101 if opts.get('follow'):
102 102 # --follow is deprecated and now just an alias for -f/--file
103 103 # to mimic the behavior of Mercurial before version 1.5
104 104 opts['file'] = 1
105 105
106 106 datefunc = ui.quiet and util.shortdate or util.datestr
107 107 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
108 108
109 109 if not pats:
110 110 raise util.Abort(_('at least one filename or pattern is required'))
111 111
112 112 opmap = [('user', lambda x: ui.shortuser(x[0].user())),
113 113 ('number', lambda x: str(x[0].rev())),
114 114 ('changeset', lambda x: short(x[0].node())),
115 115 ('date', getdate),
116 116 ('file', lambda x: x[0].path()),
117 117 ]
118 118
119 119 if (not opts.get('user') and not opts.get('changeset')
120 120 and not opts.get('date') and not opts.get('file')):
121 121 opts['number'] = 1
122 122
123 123 linenumber = opts.get('line_number') is not None
124 124 if linenumber and (not opts.get('changeset')) and (not opts.get('number')):
125 125 raise util.Abort(_('at least one of -n/-c is required for -l'))
126 126
127 127 funcmap = [func for op, func in opmap if opts.get(op)]
128 128 if linenumber:
129 129 lastfunc = funcmap[-1]
130 130 funcmap[-1] = lambda x: "%s:%s" % (lastfunc(x), x[1])
131 131
132 132 ctx = repo[opts.get('rev')]
133 133 m = cmdutil.match(repo, pats, opts)
134 134 follow = not opts.get('no_follow')
135 135 for abs in ctx.walk(m):
136 136 fctx = ctx[abs]
137 137 if not opts.get('text') and util.binary(fctx.data()):
138 138 ui.write(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs))
139 139 continue
140 140
141 141 lines = fctx.annotate(follow=follow, linenumber=linenumber)
142 142 pieces = []
143 143
144 144 for f in funcmap:
145 145 l = [f(n) for n, dummy in lines]
146 146 if l:
147 147 ml = max(map(len, l))
148 148 pieces.append(["%*s" % (ml, x) for x in l])
149 149
150 150 if pieces:
151 151 for p, l in zip(zip(*pieces), lines):
152 152 ui.write("%s: %s" % (" ".join(p), l[1]))
153 153
154 154 def archive(ui, repo, dest, **opts):
155 155 '''create an unversioned archive of a repository revision
156 156
157 157 By default, the revision used is the parent of the working
158 158 directory; use -r/--rev to specify a different revision.
159 159
160 160 The archive type is automatically detected based on file
161 161 extension (or override using -t/--type).
162 162
163 163 Valid types are:
164 164
165 165 :``files``: a directory full of files (default)
166 166 :``tar``: tar archive, uncompressed
167 167 :``tbz2``: tar archive, compressed using bzip2
168 168 :``tgz``: tar archive, compressed using gzip
169 169 :``uzip``: zip archive, uncompressed
170 170 :``zip``: zip archive, compressed using deflate
171 171
172 172 The exact name of the destination archive or directory is given
173 173 using a format string; see :hg:`help export` for details.
174 174
175 175 Each member added to an archive file has a directory prefix
176 176 prepended. Use -p/--prefix to specify a format string for the
177 177 prefix. The default is the basename of the archive, with suffixes
178 178 removed.
179 179 '''
180 180
181 181 ctx = repo[opts.get('rev')]
182 182 if not ctx:
183 183 raise util.Abort(_('no working directory: please specify a revision'))
184 184 node = ctx.node()
185 185 dest = cmdutil.make_filename(repo, dest, node)
186 186 if os.path.realpath(dest) == repo.root:
187 187 raise util.Abort(_('repository root cannot be destination'))
188 188
189 189 def guess_type():
190 190 exttypes = {
191 191 'tar': ['.tar'],
192 192 'tbz2': ['.tbz2', '.tar.bz2'],
193 193 'tgz': ['.tgz', '.tar.gz'],
194 194 'zip': ['.zip'],
195 195 }
196 196
197 197 for type, extensions in exttypes.items():
198 198 if util.any(dest.endswith(ext) for ext in extensions):
199 199 return type
200 200 return None
201 201
202 202 kind = opts.get('type') or guess_type() or 'files'
203 203 prefix = opts.get('prefix')
204 204
205 205 if dest == '-':
206 206 if kind == 'files':
207 207 raise util.Abort(_('cannot archive plain files to stdout'))
208 208 dest = sys.stdout
209 209 if not prefix:
210 210 prefix = os.path.basename(repo.root) + '-%h'
211 211
212 212 prefix = cmdutil.make_filename(repo, prefix, node)
213 213 matchfn = cmdutil.match(repo, [], opts)
214 214 archival.archive(repo, dest, node, kind, not opts.get('no_decode'),
215 215 matchfn, prefix)
216 216
217 217 def backout(ui, repo, node=None, rev=None, **opts):
218 218 '''reverse effect of earlier changeset
219 219
220 220 Commit the backed out changes as a new changeset. The new
221 221 changeset is a child of the backed out changeset.
222 222
223 223 If you backout a changeset other than the tip, a new head is
224 224 created. This head will be the new tip and you should merge this
225 225 backout changeset with another head.
226 226
227 227 The --merge option remembers the parent of the working directory
228 228 before starting the backout, then merges the new head with that
229 229 changeset afterwards. This saves you from doing the merge by hand.
230 230 The result of this merge is not committed, as with a normal merge.
231 231
232 232 See :hg:`help dates` for a list of formats valid for -d/--date.
233 233 '''
234 234 if rev and node:
235 235 raise util.Abort(_("please specify just one revision"))
236 236
237 237 if not rev:
238 238 rev = node
239 239
240 240 if not rev:
241 241 raise util.Abort(_("please specify a revision to backout"))
242 242
243 243 date = opts.get('date')
244 244 if date:
245 245 opts['date'] = util.parsedate(date)
246 246
247 247 cmdutil.bail_if_changed(repo)
248 248 node = repo.lookup(rev)
249 249
250 250 op1, op2 = repo.dirstate.parents()
251 251 a = repo.changelog.ancestor(op1, node)
252 252 if a != node:
253 253 raise util.Abort(_('cannot backout change on a different branch'))
254 254
255 255 p1, p2 = repo.changelog.parents(node)
256 256 if p1 == nullid:
257 257 raise util.Abort(_('cannot backout a change with no parents'))
258 258 if p2 != nullid:
259 259 if not opts.get('parent'):
260 260 raise util.Abort(_('cannot backout a merge changeset without '
261 261 '--parent'))
262 262 p = repo.lookup(opts['parent'])
263 263 if p not in (p1, p2):
264 264 raise util.Abort(_('%s is not a parent of %s') %
265 265 (short(p), short(node)))
266 266 parent = p
267 267 else:
268 268 if opts.get('parent'):
269 269 raise util.Abort(_('cannot use --parent on non-merge changeset'))
270 270 parent = p1
271 271
272 272 # the backout should appear on the same branch
273 273 branch = repo.dirstate.branch()
274 274 hg.clean(repo, node, show_stats=False)
275 275 repo.dirstate.setbranch(branch)
276 276 revert_opts = opts.copy()
277 277 revert_opts['date'] = None
278 278 revert_opts['all'] = True
279 279 revert_opts['rev'] = hex(parent)
280 280 revert_opts['no_backup'] = None
281 281 revert(ui, repo, **revert_opts)
282 282 commit_opts = opts.copy()
283 283 commit_opts['addremove'] = False
284 284 if not commit_opts['message'] and not commit_opts['logfile']:
285 285 # we don't translate commit messages
286 286 commit_opts['message'] = "Backed out changeset %s" % short(node)
287 287 commit_opts['force_editor'] = True
288 288 commit(ui, repo, **commit_opts)
289 289 def nice(node):
290 290 return '%d:%s' % (repo.changelog.rev(node), short(node))
291 291 ui.status(_('changeset %s backs out changeset %s\n') %
292 292 (nice(repo.changelog.tip()), nice(node)))
293 293 if op1 != node:
294 294 hg.clean(repo, op1, show_stats=False)
295 295 if opts.get('merge'):
296 296 ui.status(_('merging with changeset %s\n')
297 297 % nice(repo.changelog.tip()))
298 298 hg.merge(repo, hex(repo.changelog.tip()))
299 299 else:
300 300 ui.status(_('the backout changeset is a new head - '
301 301 'do not forget to merge\n'))
302 302 ui.status(_('(use "backout --merge" '
303 303 'if you want to auto-merge)\n'))
304 304
305 305 def bisect(ui, repo, rev=None, extra=None, command=None,
306 306 reset=None, good=None, bad=None, skip=None, noupdate=None):
307 307 """subdivision search of changesets
308 308
309 309 This command helps to find changesets which introduce problems. To
310 310 use, mark the earliest changeset you know exhibits the problem as
311 311 bad, then mark the latest changeset which is free from the problem
312 312 as good. Bisect will update your working directory to a revision
313 313 for testing (unless the -U/--noupdate option is specified). Once
314 314 you have performed tests, mark the working directory as good or
315 315 bad, and bisect will either update to another candidate changeset
316 316 or announce that it has found the bad revision.
317 317
318 318 As a shortcut, you can also use the revision argument to mark a
319 319 revision as good or bad without checking it out first.
320 320
321 321 If you supply a command, it will be used for automatic bisection.
322 322 Its exit status will be used to mark revisions as good or bad:
323 323 status 0 means good, 125 means to skip the revision, 127
324 324 (command not found) will abort the bisection, and any other
325 325 non-zero exit status means the revision is bad.
326 326 """
327 327 def print_result(nodes, good):
328 328 displayer = cmdutil.show_changeset(ui, repo, {})
329 329 if len(nodes) == 1:
330 330 # narrowed it down to a single revision
331 331 if good:
332 332 ui.write(_("The first good revision is:\n"))
333 333 else:
334 334 ui.write(_("The first bad revision is:\n"))
335 335 displayer.show(repo[nodes[0]])
336 336 else:
337 337 # multiple possible revisions
338 338 if good:
339 339 ui.write(_("Due to skipped revisions, the first "
340 340 "good revision could be any of:\n"))
341 341 else:
342 342 ui.write(_("Due to skipped revisions, the first "
343 343 "bad revision could be any of:\n"))
344 344 for n in nodes:
345 345 displayer.show(repo[n])
346 346 displayer.close()
347 347
348 348 def check_state(state, interactive=True):
349 349 if not state['good'] or not state['bad']:
350 350 if (good or bad or skip or reset) and interactive:
351 351 return
352 352 if not state['good']:
353 353 raise util.Abort(_('cannot bisect (no known good revisions)'))
354 354 else:
355 355 raise util.Abort(_('cannot bisect (no known bad revisions)'))
356 356 return True
357 357
358 358 # backward compatibility
359 359 if rev in "good bad reset init".split():
360 360 ui.warn(_("(use of 'hg bisect <cmd>' is deprecated)\n"))
361 361 cmd, rev, extra = rev, extra, None
362 362 if cmd == "good":
363 363 good = True
364 364 elif cmd == "bad":
365 365 bad = True
366 366 else:
367 367 reset = True
368 368 elif extra or good + bad + skip + reset + bool(command) > 1:
369 369 raise util.Abort(_('incompatible arguments'))
370 370
371 371 if reset:
372 372 p = repo.join("bisect.state")
373 373 if os.path.exists(p):
374 374 os.unlink(p)
375 375 return
376 376
377 377 state = hbisect.load_state(repo)
378 378
379 379 if command:
380 380 changesets = 1
381 381 try:
382 382 while changesets:
383 383 # update state
384 384 status = util.system(command)
385 385 if status == 125:
386 386 transition = "skip"
387 387 elif status == 0:
388 388 transition = "good"
389 389 # status < 0 means process was killed
390 390 elif status == 127:
391 391 raise util.Abort(_("failed to execute %s") % command)
392 392 elif status < 0:
393 393 raise util.Abort(_("%s killed") % command)
394 394 else:
395 395 transition = "bad"
396 396 ctx = repo[rev or '.']
397 397 state[transition].append(ctx.node())
398 398 ui.status(_('Changeset %d:%s: %s\n') % (ctx, ctx, transition))
399 399 check_state(state, interactive=False)
400 400 # bisect
401 401 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
402 402 # update to next check
403 403 cmdutil.bail_if_changed(repo)
404 404 hg.clean(repo, nodes[0], show_stats=False)
405 405 finally:
406 406 hbisect.save_state(repo, state)
407 407 return print_result(nodes, good)
408 408
409 409 # update state
410 410 node = repo.lookup(rev or '.')
411 411 if good or bad or skip:
412 412 if good:
413 413 state['good'].append(node)
414 414 elif bad:
415 415 state['bad'].append(node)
416 416 elif skip:
417 417 state['skip'].append(node)
418 418 hbisect.save_state(repo, state)
419 419
420 420 if not check_state(state):
421 421 return
422 422
423 423 # actually bisect
424 424 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
425 425 if changesets == 0:
426 426 print_result(nodes, good)
427 427 else:
428 428 assert len(nodes) == 1 # only a single node can be tested next
429 429 node = nodes[0]
430 430 # compute the approximate number of remaining tests
431 431 tests, size = 0, 2
432 432 while size <= changesets:
433 433 tests, size = tests + 1, size * 2
434 434 rev = repo.changelog.rev(node)
435 435 ui.write(_("Testing changeset %d:%s "
436 436 "(%d changesets remaining, ~%d tests)\n")
437 437 % (rev, short(node), changesets, tests))
438 438 if not noupdate:
439 439 cmdutil.bail_if_changed(repo)
440 440 return hg.clean(repo, node)
441 441
442 442 def branch(ui, repo, label=None, **opts):
443 443 """set or show the current branch name
444 444
445 445 With no argument, show the current branch name. With one argument,
446 446 set the working directory branch name (the branch will not exist
447 447 in the repository until the next commit). Standard practice
448 448 recommends that primary development take place on the 'default'
449 449 branch.
450 450
451 451 Unless -f/--force is specified, branch will not let you set a
452 452 branch name that already exists, even if it's inactive.
453 453
454 454 Use -C/--clean to reset the working directory branch to that of
455 455 the parent of the working directory, negating a previous branch
456 456 change.
457 457
458 458 Use the command :hg:`update` to switch to an existing branch. Use
459 459 :hg:`commit --close-branch` to mark this branch as closed.
460 460 """
461 461
462 462 if opts.get('clean'):
463 463 label = repo[None].parents()[0].branch()
464 464 repo.dirstate.setbranch(label)
465 465 ui.status(_('reset working directory to branch %s\n') % label)
466 466 elif label:
467 467 utflabel = encoding.fromlocal(label)
468 468 if not opts.get('force') and utflabel in repo.branchtags():
469 469 if label not in [p.branch() for p in repo.parents()]:
470 470 raise util.Abort(_('a branch of the same name already exists'
471 471 " (use 'hg update' to switch to it)"))
472 472 repo.dirstate.setbranch(utflabel)
473 473 ui.status(_('marked working directory as branch %s\n') % label)
474 474 else:
475 475 ui.write("%s\n" % encoding.tolocal(repo.dirstate.branch()))
476 476
477 477 def branches(ui, repo, active=False, closed=False):
478 478 """list repository named branches
479 479
480 480 List the repository's named branches, indicating which ones are
481 481 inactive. If -c/--closed is specified, also list branches which have
482 482 been marked closed (see hg commit --close-branch).
483 483
484 484 If -a/--active is specified, only show active branches. A branch
485 485 is considered active if it contains repository heads.
486 486
487 487 Use the command :hg:`update` to switch to an existing branch.
488 488 """
489 489
490 490 hexfunc = ui.debugflag and hex or short
491 491 activebranches = [repo[n].branch() for n in repo.heads()]
492 492 def testactive(tag, node):
493 493 realhead = tag in activebranches
494 494 open = node in repo.branchheads(tag, closed=False)
495 495 return realhead and open
496 496 branches = sorted([(testactive(tag, node), repo.changelog.rev(node), tag)
497 497 for tag, node in repo.branchtags().items()],
498 498 reverse=True)
499 499
500 500 for isactive, node, tag in branches:
501 501 if (not active) or isactive:
502 502 encodedtag = encoding.tolocal(tag)
503 503 if ui.quiet:
504 504 ui.write("%s\n" % encodedtag)
505 505 else:
506 506 hn = repo.lookup(node)
507 507 if isactive:
508 508 notice = ''
509 509 elif hn not in repo.branchheads(tag, closed=False):
510 510 if not closed:
511 511 continue
512 512 notice = _(' (closed)')
513 513 else:
514 514 notice = _(' (inactive)')
515 515 rev = str(node).rjust(31 - encoding.colwidth(encodedtag))
516 516 data = encodedtag, rev, hexfunc(hn), notice
517 517 ui.write("%s %s:%s%s\n" % data)
518 518
519 519 def bundle(ui, repo, fname, dest=None, **opts):
520 520 """create a changegroup file
521 521
522 522 Generate a compressed changegroup file collecting changesets not
523 523 known to be in another repository.
524 524
525 525 If you omit the destination repository, then hg assumes the
526 526 destination will have all the nodes you specify with --base
527 527 parameters. To create a bundle containing all changesets, use
528 528 -a/--all (or --base null).
529 529
530 530 You can change compression method with the -t/--type option.
531 531 The available compression methods are: none, bzip2, and
532 532 gzip (by default, bundles are compressed using bzip2).
533 533
534 534 The bundle file can then be transferred using conventional means
535 535 and applied to another repository with the unbundle or pull
536 536 command. This is useful when direct push and pull are not
537 537 available or when exporting an entire repository is undesirable.
538 538
539 539 Applying bundles preserves all changeset contents including
540 540 permissions, copy/rename information, and revision history.
541 541 """
542 542 revs = opts.get('rev') or None
543 543 if revs:
544 544 revs = [repo.lookup(rev) for rev in revs]
545 545 if opts.get('all'):
546 546 base = ['null']
547 547 else:
548 548 base = opts.get('base')
549 549 if base:
550 550 if dest:
551 551 raise util.Abort(_("--base is incompatible with specifying "
552 552 "a destination"))
553 553 base = [repo.lookup(rev) for rev in base]
554 554 # create the right base
555 555 # XXX: nodesbetween / changegroup* should be "fixed" instead
556 556 o = []
557 557 has = set((nullid,))
558 558 for n in base:
559 559 has.update(repo.changelog.reachable(n))
560 560 if revs:
561 561 visit = list(revs)
562 562 has.difference_update(revs)
563 563 else:
564 564 visit = repo.changelog.heads()
565 565 seen = {}
566 566 while visit:
567 567 n = visit.pop(0)
568 568 parents = [p for p in repo.changelog.parents(n) if p not in has]
569 569 if len(parents) == 0:
570 570 if n not in has:
571 571 o.append(n)
572 572 else:
573 573 for p in parents:
574 574 if p not in seen:
575 575 seen[p] = 1
576 576 visit.append(p)
577 577 else:
578 578 dest = ui.expandpath(dest or 'default-push', dest or 'default')
579 579 dest, branches = hg.parseurl(dest, opts.get('branch'))
580 580 other = hg.repository(cmdutil.remoteui(repo, opts), dest)
581 581 revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
582 582 o = repo.findoutgoing(other, force=opts.get('force'))
583 583
584 584 if not o:
585 585 ui.status(_("no changes found\n"))
586 586 return
587 587
588 588 if revs:
589 589 cg = repo.changegroupsubset(o, revs, 'bundle')
590 590 else:
591 591 cg = repo.changegroup(o, 'bundle')
592 592
593 593 bundletype = opts.get('type', 'bzip2').lower()
594 594 btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'}
595 595 bundletype = btypes.get(bundletype)
596 596 if bundletype not in changegroup.bundletypes:
597 597 raise util.Abort(_('unknown bundle type specified with --type'))
598 598
599 599 changegroup.writebundle(cg, fname, bundletype)
600 600
601 601 def cat(ui, repo, file1, *pats, **opts):
602 602 """output the current or given revision of files
603 603
604 604 Print the specified files as they were at the given revision. If
605 605 no revision is given, the parent of the working directory is used,
606 606 or tip if no revision is checked out.
607 607
608 608 Output may be to a file, in which case the name of the file is
609 609 given using a format string. The formatting rules are the same as
610 610 for the export command, with the following additions:
611 611
612 612 :``%s``: basename of file being printed
613 613 :``%d``: dirname of file being printed, or '.' if in repository root
614 614 :``%p``: root-relative path name of file being printed
615 615 """
616 616 ctx = repo[opts.get('rev')]
617 617 err = 1
618 618 m = cmdutil.match(repo, (file1,) + pats, opts)
619 619 for abs in ctx.walk(m):
620 620 fp = cmdutil.make_file(repo, opts.get('output'), ctx.node(), pathname=abs)
621 621 data = ctx[abs].data()
622 622 if opts.get('decode'):
623 623 data = repo.wwritedata(abs, data)
624 624 fp.write(data)
625 625 err = 0
626 626 return err
627 627
628 628 def clone(ui, source, dest=None, **opts):
629 629 """make a copy of an existing repository
630 630
631 631 Create a copy of an existing repository in a new directory.
632 632
633 633 If no destination directory name is specified, it defaults to the
634 634 basename of the source.
635 635
636 636 The location of the source is added to the new repository's
637 637 .hg/hgrc file, as the default to be used for future pulls.
638 638
639 639 See :hg:`help urls` for valid source format details.
640 640
641 641 It is possible to specify an ``ssh://`` URL as the destination, but no
642 642 .hg/hgrc and working directory will be created on the remote side.
643 643 Please see :hg:`help urls` for important details about ``ssh://`` URLs.
644 644
645 645 A set of changesets (tags, or branch names) to pull may be specified
646 646 by listing each changeset (tag, or branch name) with -r/--rev.
647 647 If -r/--rev is used, the cloned repository will contain only a subset
648 648 of the changesets of the source repository. Only the set of changesets
649 649 defined by all -r/--rev options (including all their ancestors)
650 650 will be pulled into the destination repository.
651 651 No subsequent changesets (including subsequent tags) will be present
652 652 in the destination.
653 653
654 654 Using -r/--rev (or 'clone src#rev dest') implies --pull, even for
655 655 local source repositories.
656 656
657 657 For efficiency, hardlinks are used for cloning whenever the source
658 658 and destination are on the same filesystem (note this applies only
659 659 to the repository data, not to the working directory). Some
660 660 filesystems, such as AFS, implement hardlinking incorrectly, but
661 661 do not report errors. In these cases, use the --pull option to
662 662 avoid hardlinking.
663 663
664 664 In some cases, you can clone repositories and the working directory
665 665 using full hardlinks with ::
666 666
667 667 $ cp -al REPO REPOCLONE
668 668
669 669 This is the fastest way to clone, but it is not always safe. The
670 670 operation is not atomic (making sure REPO is not modified during
671 671 the operation is up to you) and you have to make sure your editor
672 672 breaks hardlinks (Emacs and most Linux Kernel tools do so). Also,
673 673 this is not compatible with certain extensions that place their
674 674 metadata under the .hg directory, such as mq.
675 675
676 676 Mercurial will update the working directory to the first applicable
677 677 revision from this list:
678 678
679 679 a) null if -U or the source repository has no changesets
680 680 b) if -u . and the source repository is local, the first parent of
681 681 the source repository's working directory
682 682 c) the changeset specified with -u (if a branch name, this means the
683 683 latest head of that branch)
684 684 d) the changeset specified with -r
685 685 e) the tipmost head specified with -b
686 686 f) the tipmost head specified with the url#branch source syntax
687 687 g) the tipmost head of the default branch
688 688 h) tip
689 689 """
690 690 if opts.get('noupdate') and opts.get('updaterev'):
691 691 raise util.Abort(_("cannot specify both --noupdate and --updaterev"))
692 692
693 693 hg.clone(cmdutil.remoteui(ui, opts), source, dest,
694 694 pull=opts.get('pull'),
695 695 stream=opts.get('uncompressed'),
696 696 rev=opts.get('rev'),
697 697 update=opts.get('updaterev') or not opts.get('noupdate'),
698 698 branch=opts.get('branch'))
699 699
700 700 def commit(ui, repo, *pats, **opts):
701 701 """commit the specified files or all outstanding changes
702 702
703 703 Commit changes to the given files into the repository. Unlike a
704 704 centralized RCS, this operation is a local operation. See hg push
705 705 for a way to actively distribute your changes.
706 706
707 707 If a list of files is omitted, all changes reported by :hg:`status`
708 708 will be committed.
709 709
710 710 If you are committing the result of a merge, do not provide any
711 711 filenames or -I/-X filters.
712 712
713 713 If no commit message is specified, the configured editor is
714 714 started to prompt you for a message.
715 715
716 716 See :hg:`help dates` for a list of formats valid for -d/--date.
717 717 """
718 718 extra = {}
719 719 if opts.get('close_branch'):
720 720 if repo['.'].node() not in repo.branchheads():
721 721 # The topo heads set is included in the branch heads set of the
722 722 # current branch, so it's sufficient to test branchheads
723 723 raise util.Abort(_('can only close branch heads'))
724 724 extra['close'] = 1
725 725 e = cmdutil.commiteditor
726 726 if opts.get('force_editor'):
727 727 e = cmdutil.commitforceeditor
728 728
729 729 def commitfunc(ui, repo, message, match, opts):
730 730 return repo.commit(message, opts.get('user'), opts.get('date'), match,
731 731 editor=e, extra=extra)
732 732
733 branch = repo[None].branch()
734 bheads = repo.branchheads(branch)
735
733 736 node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
734 737 if not node:
735 738 ui.status(_("nothing changed\n"))
736 739 return
737 cl = repo.changelog
738 rev = cl.rev(node)
739 parents = cl.parentrevs(rev)
740 if rev - 1 in parents:
741 # one of the parents was the old tip
742 pass
743 elif (parents == (nullrev, nullrev) or
744 len(cl.heads(cl.node(parents[0]))) > 1 and
745 (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)):
740
741 ctx = repo[node]
742 parents = ctx.parents()
743
744 if bheads and [x for x in parents if x.node() not in bheads]:
746 745 ui.status(_('created new head\n'))
747 746
748 747 if not opts.get('close_branch'):
749 748 for r in parents:
750 if repo[r].extra().get('close'):
749 if r.extra().get('close'):
751 750 ui.status(_('reopening closed branch head %d\n') % r)
752 751
753 752 if ui.debugflag:
754 ui.write(_('committed changeset %d:%s\n') % (rev, hex(node)))
753 ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx.hex()))
755 754 elif ui.verbose:
756 ui.write(_('committed changeset %d:%s\n') % (rev, short(node)))
755 ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx))
757 756
758 757 def copy(ui, repo, *pats, **opts):
759 758 """mark files as copied for the next commit
760 759
761 760 Mark dest as having copies of source files. If dest is a
762 761 directory, copies are put in that directory. If dest is a file,
763 762 the source must be a single file.
764 763
765 764 By default, this command copies the contents of files as they
766 765 exist in the working directory. If invoked with -A/--after, the
767 766 operation is recorded, but no copying is performed.
768 767
769 768 This command takes effect with the next commit. To undo a copy
770 769 before that, see hg revert.
771 770 """
772 771 wlock = repo.wlock(False)
773 772 try:
774 773 return cmdutil.copy(ui, repo, pats, opts)
775 774 finally:
776 775 wlock.release()
777 776
778 777 def debugancestor(ui, repo, *args):
779 778 """find the ancestor revision of two revisions in a given index"""
780 779 if len(args) == 3:
781 780 index, rev1, rev2 = args
782 781 r = revlog.revlog(util.opener(os.getcwd(), audit=False), index)
783 782 lookup = r.lookup
784 783 elif len(args) == 2:
785 784 if not repo:
786 785 raise util.Abort(_("There is no Mercurial repository here "
787 786 "(.hg not found)"))
788 787 rev1, rev2 = args
789 788 r = repo.changelog
790 789 lookup = repo.lookup
791 790 else:
792 791 raise util.Abort(_('either two or three arguments required'))
793 792 a = r.ancestor(lookup(rev1), lookup(rev2))
794 793 ui.write("%d:%s\n" % (r.rev(a), hex(a)))
795 794
796 795 def debugcommands(ui, cmd='', *args):
797 796 for cmd, vals in sorted(table.iteritems()):
798 797 cmd = cmd.split('|')[0].strip('^')
799 798 opts = ', '.join([i[1] for i in vals[1]])
800 799 ui.write('%s: %s\n' % (cmd, opts))
801 800
802 801 def debugcomplete(ui, cmd='', **opts):
803 802 """returns the completion list associated with the given command"""
804 803
805 804 if opts.get('options'):
806 805 options = []
807 806 otables = [globalopts]
808 807 if cmd:
809 808 aliases, entry = cmdutil.findcmd(cmd, table, False)
810 809 otables.append(entry[1])
811 810 for t in otables:
812 811 for o in t:
813 812 if "(DEPRECATED)" in o[3]:
814 813 continue
815 814 if o[0]:
816 815 options.append('-%s' % o[0])
817 816 options.append('--%s' % o[1])
818 817 ui.write("%s\n" % "\n".join(options))
819 818 return
820 819
821 820 cmdlist = cmdutil.findpossible(cmd, table)
822 821 if ui.verbose:
823 822 cmdlist = [' '.join(c[0]) for c in cmdlist.values()]
824 823 ui.write("%s\n" % "\n".join(sorted(cmdlist)))
825 824
826 825 def debugfsinfo(ui, path = "."):
827 826 open('.debugfsinfo', 'w').write('')
828 827 ui.write('exec: %s\n' % (util.checkexec(path) and 'yes' or 'no'))
829 828 ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no'))
830 829 ui.write('case-sensitive: %s\n' % (util.checkcase('.debugfsinfo')
831 830 and 'yes' or 'no'))
832 831 os.unlink('.debugfsinfo')
833 832
834 833 def debugrebuildstate(ui, repo, rev="tip"):
835 834 """rebuild the dirstate as it would look like for the given revision"""
836 835 ctx = repo[rev]
837 836 wlock = repo.wlock()
838 837 try:
839 838 repo.dirstate.rebuild(ctx.node(), ctx.manifest())
840 839 finally:
841 840 wlock.release()
842 841
843 842 def debugcheckstate(ui, repo):
844 843 """validate the correctness of the current dirstate"""
845 844 parent1, parent2 = repo.dirstate.parents()
846 845 m1 = repo[parent1].manifest()
847 846 m2 = repo[parent2].manifest()
848 847 errors = 0
849 848 for f in repo.dirstate:
850 849 state = repo.dirstate[f]
851 850 if state in "nr" and f not in m1:
852 851 ui.warn(_("%s in state %s, but not in manifest1\n") % (f, state))
853 852 errors += 1
854 853 if state in "a" and f in m1:
855 854 ui.warn(_("%s in state %s, but also in manifest1\n") % (f, state))
856 855 errors += 1
857 856 if state in "m" and f not in m1 and f not in m2:
858 857 ui.warn(_("%s in state %s, but not in either manifest\n") %
859 858 (f, state))
860 859 errors += 1
861 860 for f in m1:
862 861 state = repo.dirstate[f]
863 862 if state not in "nrm":
864 863 ui.warn(_("%s in manifest1, but listed as state %s") % (f, state))
865 864 errors += 1
866 865 if errors:
867 866 error = _(".hg/dirstate inconsistent with current parent's manifest")
868 867 raise util.Abort(error)
869 868
870 869 def showconfig(ui, repo, *values, **opts):
871 870 """show combined config settings from all hgrc files
872 871
873 872 With no arguments, print names and values of all config items.
874 873
875 874 With one argument of the form section.name, print just the value
876 875 of that config item.
877 876
878 877 With multiple arguments, print names and values of all config
879 878 items with matching section names.
880 879
881 880 With --debug, the source (filename and line number) is printed
882 881 for each config item.
883 882 """
884 883
885 884 for f in util.rcpath():
886 885 ui.debug(_('read config from: %s\n') % f)
887 886 untrusted = bool(opts.get('untrusted'))
888 887 if values:
889 888 if len([v for v in values if '.' in v]) > 1:
890 889 raise util.Abort(_('only one config item permitted'))
891 890 for section, name, value in ui.walkconfig(untrusted=untrusted):
892 891 sectname = section + '.' + name
893 892 if values:
894 893 for v in values:
895 894 if v == section:
896 895 ui.debug('%s: ' %
897 896 ui.configsource(section, name, untrusted))
898 897 ui.write('%s=%s\n' % (sectname, value))
899 898 elif v == sectname:
900 899 ui.debug('%s: ' %
901 900 ui.configsource(section, name, untrusted))
902 901 ui.write(value, '\n')
903 902 else:
904 903 ui.debug('%s: ' %
905 904 ui.configsource(section, name, untrusted))
906 905 ui.write('%s=%s\n' % (sectname, value))
907 906
908 907 def debugsetparents(ui, repo, rev1, rev2=None):
909 908 """manually set the parents of the current working directory
910 909
911 910 This is useful for writing repository conversion tools, but should
912 911 be used with care.
913 912 """
914 913
915 914 if not rev2:
916 915 rev2 = hex(nullid)
917 916
918 917 wlock = repo.wlock()
919 918 try:
920 919 repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2))
921 920 finally:
922 921 wlock.release()
923 922
924 923 def debugstate(ui, repo, nodates=None):
925 924 """show the contents of the current dirstate"""
926 925 timestr = ""
927 926 showdate = not nodates
928 927 for file_, ent in sorted(repo.dirstate._map.iteritems()):
929 928 if showdate:
930 929 if ent[3] == -1:
931 930 # Pad or slice to locale representation
932 931 locale_len = len(time.strftime("%Y-%m-%d %H:%M:%S ",
933 932 time.localtime(0)))
934 933 timestr = 'unset'
935 934 timestr = (timestr[:locale_len] +
936 935 ' ' * (locale_len - len(timestr)))
937 936 else:
938 937 timestr = time.strftime("%Y-%m-%d %H:%M:%S ",
939 938 time.localtime(ent[3]))
940 939 if ent[1] & 020000:
941 940 mode = 'lnk'
942 941 else:
943 942 mode = '%3o' % (ent[1] & 0777)
944 943 ui.write("%c %s %10d %s%s\n" % (ent[0], mode, ent[2], timestr, file_))
945 944 for f in repo.dirstate.copies():
946 945 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))
947 946
948 947 def debugsub(ui, repo, rev=None):
949 948 if rev == '':
950 949 rev = None
951 950 for k, v in sorted(repo[rev].substate.items()):
952 951 ui.write('path %s\n' % k)
953 952 ui.write(' source %s\n' % v[0])
954 953 ui.write(' revision %s\n' % v[1])
955 954
956 955 def debugdata(ui, file_, rev):
957 956 """dump the contents of a data file revision"""
958 957 r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_[:-2] + ".i")
959 958 try:
960 959 ui.write(r.revision(r.lookup(rev)))
961 960 except KeyError:
962 961 raise util.Abort(_('invalid revision identifier %s') % rev)
963 962
964 963 def debugdate(ui, date, range=None, **opts):
965 964 """parse and display a date"""
966 965 if opts["extended"]:
967 966 d = util.parsedate(date, util.extendeddateformats)
968 967 else:
969 968 d = util.parsedate(date)
970 969 ui.write("internal: %s %s\n" % d)
971 970 ui.write("standard: %s\n" % util.datestr(d))
972 971 if range:
973 972 m = util.matchdate(range)
974 973 ui.write("match: %s\n" % m(d[0]))
975 974
976 975 def debugindex(ui, file_):
977 976 """dump the contents of an index file"""
978 977 r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_)
979 978 ui.write(" rev offset length base linkrev"
980 979 " nodeid p1 p2\n")
981 980 for i in r:
982 981 node = r.node(i)
983 982 try:
984 983 pp = r.parents(node)
985 984 except:
986 985 pp = [nullid, nullid]
987 986 ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % (
988 987 i, r.start(i), r.length(i), r.base(i), r.linkrev(i),
989 988 short(node), short(pp[0]), short(pp[1])))
990 989
991 990 def debugindexdot(ui, file_):
992 991 """dump an index DAG as a graphviz dot file"""
993 992 r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_)
994 993 ui.write("digraph G {\n")
995 994 for i in r:
996 995 node = r.node(i)
997 996 pp = r.parents(node)
998 997 ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i))
999 998 if pp[1] != nullid:
1000 999 ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
1001 1000 ui.write("}\n")
1002 1001
1003 1002 def debuginstall(ui):
1004 1003 '''test Mercurial installation'''
1005 1004
1006 1005 def writetemp(contents):
1007 1006 (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-")
1008 1007 f = os.fdopen(fd, "wb")
1009 1008 f.write(contents)
1010 1009 f.close()
1011 1010 return name
1012 1011
1013 1012 problems = 0
1014 1013
1015 1014 # encoding
1016 1015 ui.status(_("Checking encoding (%s)...\n") % encoding.encoding)
1017 1016 try:
1018 1017 encoding.fromlocal("test")
1019 1018 except util.Abort, inst:
1020 1019 ui.write(" %s\n" % inst)
1021 1020 ui.write(_(" (check that your locale is properly set)\n"))
1022 1021 problems += 1
1023 1022
1024 1023 # compiled modules
1025 1024 ui.status(_("Checking extensions...\n"))
1026 1025 try:
1027 1026 import bdiff, mpatch, base85
1028 1027 except Exception, inst:
1029 1028 ui.write(" %s\n" % inst)
1030 1029 ui.write(_(" One or more extensions could not be found"))
1031 1030 ui.write(_(" (check that you compiled the extensions)\n"))
1032 1031 problems += 1
1033 1032
1034 1033 # templates
1035 1034 ui.status(_("Checking templates...\n"))
1036 1035 try:
1037 1036 import templater
1038 1037 templater.templater(templater.templatepath("map-cmdline.default"))
1039 1038 except Exception, inst:
1040 1039 ui.write(" %s\n" % inst)
1041 1040 ui.write(_(" (templates seem to have been installed incorrectly)\n"))
1042 1041 problems += 1
1043 1042
1044 1043 # patch
1045 1044 ui.status(_("Checking patch...\n"))
1046 1045 patchproblems = 0
1047 1046 a = "1\n2\n3\n4\n"
1048 1047 b = "1\n2\n3\ninsert\n4\n"
1049 1048 fa = writetemp(a)
1050 1049 d = mdiff.unidiff(a, None, b, None, os.path.basename(fa),
1051 1050 os.path.basename(fa))
1052 1051 fd = writetemp(d)
1053 1052
1054 1053 files = {}
1055 1054 try:
1056 1055 patch.patch(fd, ui, cwd=os.path.dirname(fa), files=files)
1057 1056 except util.Abort, e:
1058 1057 ui.write(_(" patch call failed:\n"))
1059 1058 ui.write(" " + str(e) + "\n")
1060 1059 patchproblems += 1
1061 1060 else:
1062 1061 if list(files) != [os.path.basename(fa)]:
1063 1062 ui.write(_(" unexpected patch output!\n"))
1064 1063 patchproblems += 1
1065 1064 a = open(fa).read()
1066 1065 if a != b:
1067 1066 ui.write(_(" patch test failed!\n"))
1068 1067 patchproblems += 1
1069 1068
1070 1069 if patchproblems:
1071 1070 if ui.config('ui', 'patch'):
1072 1071 ui.write(_(" (Current patch tool may be incompatible with patch,"
1073 1072 " or misconfigured. Please check your .hgrc file)\n"))
1074 1073 else:
1075 1074 ui.write(_(" Internal patcher failure, please report this error"
1076 1075 " to http://mercurial.selenic.com/bts/\n"))
1077 1076 problems += patchproblems
1078 1077
1079 1078 os.unlink(fa)
1080 1079 os.unlink(fd)
1081 1080
1082 1081 # editor
1083 1082 ui.status(_("Checking commit editor...\n"))
1084 1083 editor = ui.geteditor()
1085 1084 cmdpath = util.find_exe(editor) or util.find_exe(editor.split()[0])
1086 1085 if not cmdpath:
1087 1086 if editor == 'vi':
1088 1087 ui.write(_(" No commit editor set and can't find vi in PATH\n"))
1089 1088 ui.write(_(" (specify a commit editor in your .hgrc file)\n"))
1090 1089 else:
1091 1090 ui.write(_(" Can't find editor '%s' in PATH\n") % editor)
1092 1091 ui.write(_(" (specify a commit editor in your .hgrc file)\n"))
1093 1092 problems += 1
1094 1093
1095 1094 # check username
1096 1095 ui.status(_("Checking username...\n"))
1097 1096 try:
1098 1097 user = ui.username()
1099 1098 except util.Abort, e:
1100 1099 ui.write(" %s\n" % e)
1101 1100 ui.write(_(" (specify a username in your .hgrc file)\n"))
1102 1101 problems += 1
1103 1102
1104 1103 if not problems:
1105 1104 ui.status(_("No problems detected\n"))
1106 1105 else:
1107 1106 ui.write(_("%s problems detected,"
1108 1107 " please check your install!\n") % problems)
1109 1108
1110 1109 return problems
1111 1110
1112 1111 def debugrename(ui, repo, file1, *pats, **opts):
1113 1112 """dump rename information"""
1114 1113
1115 1114 ctx = repo[opts.get('rev')]
1116 1115 m = cmdutil.match(repo, (file1,) + pats, opts)
1117 1116 for abs in ctx.walk(m):
1118 1117 fctx = ctx[abs]
1119 1118 o = fctx.filelog().renamed(fctx.filenode())
1120 1119 rel = m.rel(abs)
1121 1120 if o:
1122 1121 ui.write(_("%s renamed from %s:%s\n") % (rel, o[0], hex(o[1])))
1123 1122 else:
1124 1123 ui.write(_("%s not renamed\n") % rel)
1125 1124
1126 1125 def debugwalk(ui, repo, *pats, **opts):
1127 1126 """show how files match on given patterns"""
1128 1127 m = cmdutil.match(repo, pats, opts)
1129 1128 items = list(repo.walk(m))
1130 1129 if not items:
1131 1130 return
1132 1131 fmt = 'f %%-%ds %%-%ds %%s' % (
1133 1132 max([len(abs) for abs in items]),
1134 1133 max([len(m.rel(abs)) for abs in items]))
1135 1134 for abs in items:
1136 1135 line = fmt % (abs, m.rel(abs), m.exact(abs) and 'exact' or '')
1137 1136 ui.write("%s\n" % line.rstrip())
1138 1137
1139 1138 def diff(ui, repo, *pats, **opts):
1140 1139 """diff repository (or selected files)
1141 1140
1142 1141 Show differences between revisions for the specified files.
1143 1142
1144 1143 Differences between files are shown using the unified diff format.
1145 1144
1146 1145 NOTE: diff may generate unexpected results for merges, as it will
1147 1146 default to comparing against the working directory's first parent
1148 1147 changeset if no revisions are specified.
1149 1148
1150 1149 When two revision arguments are given, then changes are shown
1151 1150 between those revisions. If only one revision is specified then
1152 1151 that revision is compared to the working directory, and, when no
1153 1152 revisions are specified, the working directory files are compared
1154 1153 to its parent.
1155 1154
1156 1155 Alternatively you can specify -c/--change with a revision to see
1157 1156 the changes in that changeset relative to its first parent.
1158 1157
1159 1158 Without the -a/--text option, diff will avoid generating diffs of
1160 1159 files it detects as binary. With -a, diff will generate a diff
1161 1160 anyway, probably with undesirable results.
1162 1161
1163 1162 Use the -g/--git option to generate diffs in the git extended diff
1164 1163 format. For more information, read :hg:`help diffs`.
1165 1164 """
1166 1165
1167 1166 revs = opts.get('rev')
1168 1167 change = opts.get('change')
1169 1168 stat = opts.get('stat')
1170 1169 reverse = opts.get('reverse')
1171 1170
1172 1171 if revs and change:
1173 1172 msg = _('cannot specify --rev and --change at the same time')
1174 1173 raise util.Abort(msg)
1175 1174 elif change:
1176 1175 node2 = repo.lookup(change)
1177 1176 node1 = repo[node2].parents()[0].node()
1178 1177 else:
1179 1178 node1, node2 = cmdutil.revpair(repo, revs)
1180 1179
1181 1180 if reverse:
1182 1181 node1, node2 = node2, node1
1183 1182
1184 1183 diffopts = patch.diffopts(ui, opts)
1185 1184 m = cmdutil.match(repo, pats, opts)
1186 1185 cmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat)
1187 1186
1188 1187 def export(ui, repo, *changesets, **opts):
1189 1188 """dump the header and diffs for one or more changesets
1190 1189
1191 1190 Print the changeset header and diffs for one or more revisions.
1192 1191
1193 1192 The information shown in the changeset header is: author, date,
1194 1193 branch name (if non-default), changeset hash, parent(s) and commit
1195 1194 comment.
1196 1195
1197 1196 NOTE: export may generate unexpected diff output for merge
1198 1197 changesets, as it will compare the merge changeset against its
1199 1198 first parent only.
1200 1199
1201 1200 Output may be to a file, in which case the name of the file is
1202 1201 given using a format string. The formatting rules are as follows:
1203 1202
1204 1203 :``%%``: literal "%" character
1205 1204 :``%H``: changeset hash (40 bytes of hexadecimal)
1206 1205 :``%N``: number of patches being generated
1207 1206 :``%R``: changeset revision number
1208 1207 :``%b``: basename of the exporting repository
1209 1208 :``%h``: short-form changeset hash (12 bytes of hexadecimal)
1210 1209 :``%n``: zero-padded sequence number, starting at 1
1211 1210 :``%r``: zero-padded changeset revision number
1212 1211
1213 1212 Without the -a/--text option, export will avoid generating diffs
1214 1213 of files it detects as binary. With -a, export will generate a
1215 1214 diff anyway, probably with undesirable results.
1216 1215
1217 1216 Use the -g/--git option to generate diffs in the git extended diff
1218 1217 format. See :hg:`help diffs` for more information.
1219 1218
1220 1219 With the --switch-parent option, the diff will be against the
1221 1220 second parent. It can be useful to review a merge.
1222 1221 """
1223 1222 changesets += tuple(opts.get('rev', []))
1224 1223 if not changesets:
1225 1224 raise util.Abort(_("export requires at least one changeset"))
1226 1225 revs = cmdutil.revrange(repo, changesets)
1227 1226 if len(revs) > 1:
1228 1227 ui.note(_('exporting patches:\n'))
1229 1228 else:
1230 1229 ui.note(_('exporting patch:\n'))
1231 1230 cmdutil.export(repo, revs, template=opts.get('output'),
1232 1231 switch_parent=opts.get('switch_parent'),
1233 1232 opts=patch.diffopts(ui, opts))
1234 1233
1235 1234 def forget(ui, repo, *pats, **opts):
1236 1235 """forget the specified files on the next commit
1237 1236
1238 1237 Mark the specified files so they will no longer be tracked
1239 1238 after the next commit.
1240 1239
1241 1240 This only removes files from the current branch, not from the
1242 1241 entire project history, and it does not delete them from the
1243 1242 working directory.
1244 1243
1245 1244 To undo a forget before the next commit, see hg add.
1246 1245 """
1247 1246
1248 1247 if not pats:
1249 1248 raise util.Abort(_('no files specified'))
1250 1249
1251 1250 m = cmdutil.match(repo, pats, opts)
1252 1251 s = repo.status(match=m, clean=True)
1253 1252 forget = sorted(s[0] + s[1] + s[3] + s[6])
1254 1253
1255 1254 for f in m.files():
1256 1255 if f not in repo.dirstate and not os.path.isdir(m.rel(f)):
1257 1256 ui.warn(_('not removing %s: file is already untracked\n')
1258 1257 % m.rel(f))
1259 1258
1260 1259 for f in forget:
1261 1260 if ui.verbose or not m.exact(f):
1262 1261 ui.status(_('removing %s\n') % m.rel(f))
1263 1262
1264 1263 repo.remove(forget, unlink=False)
1265 1264
1266 1265 def grep(ui, repo, pattern, *pats, **opts):
1267 1266 """search for a pattern in specified files and revisions
1268 1267
1269 1268 Search revisions of files for a regular expression.
1270 1269
1271 1270 This command behaves differently than Unix grep. It only accepts
1272 1271 Python/Perl regexps. It searches repository history, not the
1273 1272 working directory. It always prints the revision number in which a
1274 1273 match appears.
1275 1274
1276 1275 By default, grep only prints output for the first revision of a
1277 1276 file in which it finds a match. To get it to print every revision
1278 1277 that contains a change in match status ("-" for a match that
1279 1278 becomes a non-match, or "+" for a non-match that becomes a match),
1280 1279 use the --all flag.
1281 1280 """
1282 1281 reflags = 0
1283 1282 if opts.get('ignore_case'):
1284 1283 reflags |= re.I
1285 1284 try:
1286 1285 regexp = re.compile(pattern, reflags)
1287 1286 except Exception, inst:
1288 1287 ui.warn(_("grep: invalid match pattern: %s\n") % inst)
1289 1288 return None
1290 1289 sep, eol = ':', '\n'
1291 1290 if opts.get('print0'):
1292 1291 sep = eol = '\0'
1293 1292
1294 1293 getfile = util.lrucachefunc(repo.file)
1295 1294
1296 1295 def matchlines(body):
1297 1296 begin = 0
1298 1297 linenum = 0
1299 1298 while True:
1300 1299 match = regexp.search(body, begin)
1301 1300 if not match:
1302 1301 break
1303 1302 mstart, mend = match.span()
1304 1303 linenum += body.count('\n', begin, mstart) + 1
1305 1304 lstart = body.rfind('\n', begin, mstart) + 1 or begin
1306 1305 begin = body.find('\n', mend) + 1 or len(body)
1307 1306 lend = begin - 1
1308 1307 yield linenum, mstart - lstart, mend - lstart, body[lstart:lend]
1309 1308
1310 1309 class linestate(object):
1311 1310 def __init__(self, line, linenum, colstart, colend):
1312 1311 self.line = line
1313 1312 self.linenum = linenum
1314 1313 self.colstart = colstart
1315 1314 self.colend = colend
1316 1315
1317 1316 def __hash__(self):
1318 1317 return hash((self.linenum, self.line))
1319 1318
1320 1319 def __eq__(self, other):
1321 1320 return self.line == other.line
1322 1321
1323 1322 matches = {}
1324 1323 copies = {}
1325 1324 def grepbody(fn, rev, body):
1326 1325 matches[rev].setdefault(fn, [])
1327 1326 m = matches[rev][fn]
1328 1327 for lnum, cstart, cend, line in matchlines(body):
1329 1328 s = linestate(line, lnum, cstart, cend)
1330 1329 m.append(s)
1331 1330
1332 1331 def difflinestates(a, b):
1333 1332 sm = difflib.SequenceMatcher(None, a, b)
1334 1333 for tag, alo, ahi, blo, bhi in sm.get_opcodes():
1335 1334 if tag == 'insert':
1336 1335 for i in xrange(blo, bhi):
1337 1336 yield ('+', b[i])
1338 1337 elif tag == 'delete':
1339 1338 for i in xrange(alo, ahi):
1340 1339 yield ('-', a[i])
1341 1340 elif tag == 'replace':
1342 1341 for i in xrange(alo, ahi):
1343 1342 yield ('-', a[i])
1344 1343 for i in xrange(blo, bhi):
1345 1344 yield ('+', b[i])
1346 1345
1347 1346 def display(fn, ctx, pstates, states):
1348 1347 rev = ctx.rev()
1349 1348 datefunc = ui.quiet and util.shortdate or util.datestr
1350 1349 found = False
1351 1350 filerevmatches = {}
1352 1351 if opts.get('all'):
1353 1352 iter = difflinestates(pstates, states)
1354 1353 else:
1355 1354 iter = [('', l) for l in states]
1356 1355 for change, l in iter:
1357 1356 cols = [fn, str(rev)]
1358 1357 before, match, after = None, None, None
1359 1358 if opts.get('line_number'):
1360 1359 cols.append(str(l.linenum))
1361 1360 if opts.get('all'):
1362 1361 cols.append(change)
1363 1362 if opts.get('user'):
1364 1363 cols.append(ui.shortuser(ctx.user()))
1365 1364 if opts.get('date'):
1366 1365 cols.append(datefunc(ctx.date()))
1367 1366 if opts.get('files_with_matches'):
1368 1367 c = (fn, rev)
1369 1368 if c in filerevmatches:
1370 1369 continue
1371 1370 filerevmatches[c] = 1
1372 1371 else:
1373 1372 before = l.line[:l.colstart]
1374 1373 match = l.line[l.colstart:l.colend]
1375 1374 after = l.line[l.colend:]
1376 1375 ui.write(sep.join(cols))
1377 1376 if before is not None:
1378 1377 ui.write(sep + before)
1379 1378 ui.write(match, label='grep.match')
1380 1379 ui.write(after)
1381 1380 ui.write(eol)
1382 1381 found = True
1383 1382 return found
1384 1383
1385 1384 skip = {}
1386 1385 revfiles = {}
1387 1386 matchfn = cmdutil.match(repo, pats, opts)
1388 1387 found = False
1389 1388 follow = opts.get('follow')
1390 1389
1391 1390 def prep(ctx, fns):
1392 1391 rev = ctx.rev()
1393 1392 pctx = ctx.parents()[0]
1394 1393 parent = pctx.rev()
1395 1394 matches.setdefault(rev, {})
1396 1395 matches.setdefault(parent, {})
1397 1396 files = revfiles.setdefault(rev, [])
1398 1397 for fn in fns:
1399 1398 flog = getfile(fn)
1400 1399 try:
1401 1400 fnode = ctx.filenode(fn)
1402 1401 except error.LookupError:
1403 1402 continue
1404 1403
1405 1404 copied = flog.renamed(fnode)
1406 1405 copy = follow and copied and copied[0]
1407 1406 if copy:
1408 1407 copies.setdefault(rev, {})[fn] = copy
1409 1408 if fn in skip:
1410 1409 if copy:
1411 1410 skip[copy] = True
1412 1411 continue
1413 1412 files.append(fn)
1414 1413
1415 1414 if fn not in matches[rev]:
1416 1415 grepbody(fn, rev, flog.read(fnode))
1417 1416
1418 1417 pfn = copy or fn
1419 1418 if pfn not in matches[parent]:
1420 1419 try:
1421 1420 fnode = pctx.filenode(pfn)
1422 1421 grepbody(pfn, parent, flog.read(fnode))
1423 1422 except error.LookupError:
1424 1423 pass
1425 1424
1426 1425 for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
1427 1426 rev = ctx.rev()
1428 1427 parent = ctx.parents()[0].rev()
1429 1428 for fn in sorted(revfiles.get(rev, [])):
1430 1429 states = matches[rev][fn]
1431 1430 copy = copies.get(rev, {}).get(fn)
1432 1431 if fn in skip:
1433 1432 if copy:
1434 1433 skip[copy] = True
1435 1434 continue
1436 1435 pstates = matches.get(parent, {}).get(copy or fn, [])
1437 1436 if pstates or states:
1438 1437 r = display(fn, ctx, pstates, states)
1439 1438 found = found or r
1440 1439 if r and not opts.get('all'):
1441 1440 skip[fn] = True
1442 1441 if copy:
1443 1442 skip[copy] = True
1444 1443 del matches[rev]
1445 1444 del revfiles[rev]
1446 1445
1447 1446 def heads(ui, repo, *branchrevs, **opts):
1448 1447 """show current repository heads or show branch heads
1449 1448
1450 1449 With no arguments, show all repository branch heads.
1451 1450
1452 1451 Repository "heads" are changesets with no child changesets. They are
1453 1452 where development generally takes place and are the usual targets
1454 1453 for update and merge operations. Branch heads are changesets that have
1455 1454 no child changeset on the same branch.
1456 1455
1457 1456 If one or more REVs are given, only branch heads on the branches
1458 1457 associated with the specified changesets are shown.
1459 1458
1460 1459 If -c/--closed is specified, also show branch heads marked closed
1461 1460 (see hg commit --close-branch).
1462 1461
1463 1462 If STARTREV is specified, only those heads that are descendants of
1464 1463 STARTREV will be displayed.
1465 1464
1466 1465 If -t/--topo is specified, named branch mechanics will be ignored and only
1467 1466 changesets without children will be shown.
1468 1467 """
1469 1468
1470 1469 if opts.get('rev'):
1471 1470 start = repo.lookup(opts['rev'])
1472 1471 else:
1473 1472 start = None
1474 1473
1475 1474 if opts.get('topo'):
1476 1475 heads = [repo[h] for h in repo.heads(start)]
1477 1476 else:
1478 1477 heads = []
1479 1478 for b, ls in repo.branchmap().iteritems():
1480 1479 if start is None:
1481 1480 heads += [repo[h] for h in ls]
1482 1481 continue
1483 1482 startrev = repo.changelog.rev(start)
1484 1483 descendants = set(repo.changelog.descendants(startrev))
1485 1484 descendants.add(startrev)
1486 1485 rev = repo.changelog.rev
1487 1486 heads += [repo[h] for h in ls if rev(h) in descendants]
1488 1487
1489 1488 if branchrevs:
1490 1489 decode, encode = encoding.fromlocal, encoding.tolocal
1491 1490 branches = set(repo[decode(br)].branch() for br in branchrevs)
1492 1491 heads = [h for h in heads if h.branch() in branches]
1493 1492
1494 1493 if not opts.get('closed'):
1495 1494 heads = [h for h in heads if not h.extra().get('close')]
1496 1495
1497 1496 if opts.get('active') and branchrevs:
1498 1497 dagheads = repo.heads(start)
1499 1498 heads = [h for h in heads if h.node() in dagheads]
1500 1499
1501 1500 if branchrevs:
1502 1501 haveheads = set(h.branch() for h in heads)
1503 1502 if branches - haveheads:
1504 1503 headless = ', '.join(encode(b) for b in branches - haveheads)
1505 1504 msg = _('no open branch heads found on branches %s')
1506 1505 if opts.get('rev'):
1507 1506 msg += _(' (started at %s)' % opts['rev'])
1508 1507 ui.warn((msg + '\n') % headless)
1509 1508
1510 1509 if not heads:
1511 1510 return 1
1512 1511
1513 1512 heads = sorted(heads, key=lambda x: -x.rev())
1514 1513 displayer = cmdutil.show_changeset(ui, repo, opts)
1515 1514 for ctx in heads:
1516 1515 displayer.show(ctx)
1517 1516 displayer.close()
1518 1517
1519 1518 def help_(ui, name=None, with_version=False, unknowncmd=False):
1520 1519 """show help for a given topic or a help overview
1521 1520
1522 1521 With no arguments, print a list of commands with short help messages.
1523 1522
1524 1523 Given a topic, extension, or command name, print help for that
1525 1524 topic."""
1526 1525 option_lists = []
1527 1526 textwidth = util.termwidth() - 2
1528 1527
1529 1528 def addglobalopts(aliases):
1530 1529 if ui.verbose:
1531 1530 option_lists.append((_("global options:"), globalopts))
1532 1531 if name == 'shortlist':
1533 1532 option_lists.append((_('use "hg help" for the full list '
1534 1533 'of commands'), ()))
1535 1534 else:
1536 1535 if name == 'shortlist':
1537 1536 msg = _('use "hg help" for the full list of commands '
1538 1537 'or "hg -v" for details')
1539 1538 elif aliases:
1540 1539 msg = _('use "hg -v help%s" to show aliases and '
1541 1540 'global options') % (name and " " + name or "")
1542 1541 else:
1543 1542 msg = _('use "hg -v help %s" to show global options') % name
1544 1543 option_lists.append((msg, ()))
1545 1544
1546 1545 def helpcmd(name):
1547 1546 if with_version:
1548 1547 version_(ui)
1549 1548 ui.write('\n')
1550 1549
1551 1550 try:
1552 1551 aliases, entry = cmdutil.findcmd(name, table, strict=unknowncmd)
1553 1552 except error.AmbiguousCommand, inst:
1554 1553 # py3k fix: except vars can't be used outside the scope of the
1555 1554 # except block, nor can be used inside a lambda. python issue4617
1556 1555 prefix = inst.args[0]
1557 1556 select = lambda c: c.lstrip('^').startswith(prefix)
1558 1557 helplist(_('list of commands:\n\n'), select)
1559 1558 return
1560 1559
1561 1560 # check if it's an invalid alias and display its error if it is
1562 1561 if getattr(entry[0], 'badalias', False):
1563 1562 if not unknowncmd:
1564 1563 entry[0](ui)
1565 1564 return
1566 1565
1567 1566 # synopsis
1568 1567 if len(entry) > 2:
1569 1568 if entry[2].startswith('hg'):
1570 1569 ui.write("%s\n" % entry[2])
1571 1570 else:
1572 1571 ui.write('hg %s %s\n' % (aliases[0], entry[2]))
1573 1572 else:
1574 1573 ui.write('hg %s\n' % aliases[0])
1575 1574
1576 1575 # aliases
1577 1576 if not ui.quiet and len(aliases) > 1:
1578 1577 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))
1579 1578
1580 1579 # description
1581 1580 doc = gettext(entry[0].__doc__)
1582 1581 if not doc:
1583 1582 doc = _("(no help text available)")
1584 1583 if hasattr(entry[0], 'definition'): # aliased command
1585 1584 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
1586 1585 if ui.quiet:
1587 1586 doc = doc.splitlines()[0]
1588 1587 keep = ui.verbose and ['verbose'] or []
1589 1588 formatted, pruned = minirst.format(doc, textwidth, keep=keep)
1590 1589 ui.write("\n%s\n" % formatted)
1591 1590 if pruned:
1592 1591 ui.write(_('\nuse "hg -v help %s" to show verbose help\n') % name)
1593 1592
1594 1593 if not ui.quiet:
1595 1594 # options
1596 1595 if entry[1]:
1597 1596 option_lists.append((_("options:\n"), entry[1]))
1598 1597
1599 1598 addglobalopts(False)
1600 1599
1601 1600 def helplist(header, select=None):
1602 1601 h = {}
1603 1602 cmds = {}
1604 1603 for c, e in table.iteritems():
1605 1604 f = c.split("|", 1)[0]
1606 1605 if select and not select(f):
1607 1606 continue
1608 1607 if (not select and name != 'shortlist' and
1609 1608 e[0].__module__ != __name__):
1610 1609 continue
1611 1610 if name == "shortlist" and not f.startswith("^"):
1612 1611 continue
1613 1612 f = f.lstrip("^")
1614 1613 if not ui.debugflag and f.startswith("debug"):
1615 1614 continue
1616 1615 doc = e[0].__doc__
1617 1616 if doc and 'DEPRECATED' in doc and not ui.verbose:
1618 1617 continue
1619 1618 doc = gettext(doc)
1620 1619 if not doc:
1621 1620 doc = _("(no help text available)")
1622 1621 h[f] = doc.splitlines()[0].rstrip()
1623 1622 cmds[f] = c.lstrip("^")
1624 1623
1625 1624 if not h:
1626 1625 ui.status(_('no commands defined\n'))
1627 1626 return
1628 1627
1629 1628 ui.status(header)
1630 1629 fns = sorted(h)
1631 1630 m = max(map(len, fns))
1632 1631 for f in fns:
1633 1632 if ui.verbose:
1634 1633 commands = cmds[f].replace("|",", ")
1635 1634 ui.write(" %s:\n %s\n"%(commands, h[f]))
1636 1635 else:
1637 1636 ui.write(' %-*s %s\n' % (m, f, util.wrap(h[f], m + 4)))
1638 1637
1639 1638 if not ui.quiet:
1640 1639 addglobalopts(True)
1641 1640
1642 1641 def helptopic(name):
1643 1642 for names, header, doc in help.helptable:
1644 1643 if name in names:
1645 1644 break
1646 1645 else:
1647 1646 raise error.UnknownCommand(name)
1648 1647
1649 1648 # description
1650 1649 if not doc:
1651 1650 doc = _("(no help text available)")
1652 1651 if hasattr(doc, '__call__'):
1653 1652 doc = doc()
1654 1653
1655 1654 ui.write("%s\n\n" % header)
1656 1655 ui.write("%s\n" % minirst.format(doc, textwidth, indent=4))
1657 1656
1658 1657 def helpext(name):
1659 1658 try:
1660 1659 mod = extensions.find(name)
1661 1660 doc = gettext(mod.__doc__) or _('no help text available')
1662 1661 except KeyError:
1663 1662 mod = None
1664 1663 doc = extensions.disabledext(name)
1665 1664 if not doc:
1666 1665 raise error.UnknownCommand(name)
1667 1666
1668 1667 if '\n' not in doc:
1669 1668 head, tail = doc, ""
1670 1669 else:
1671 1670 head, tail = doc.split('\n', 1)
1672 1671 ui.write(_('%s extension - %s\n\n') % (name.split('.')[-1], head))
1673 1672 if tail:
1674 1673 ui.write(minirst.format(tail, textwidth))
1675 1674 ui.status('\n\n')
1676 1675
1677 1676 if mod:
1678 1677 try:
1679 1678 ct = mod.cmdtable
1680 1679 except AttributeError:
1681 1680 ct = {}
1682 1681 modcmds = set([c.split('|', 1)[0] for c in ct])
1683 1682 helplist(_('list of commands:\n\n'), modcmds.__contains__)
1684 1683 else:
1685 1684 ui.write(_('use "hg help extensions" for information on enabling '
1686 1685 'extensions\n'))
1687 1686
1688 1687 def helpextcmd(name):
1689 1688 cmd, ext, mod = extensions.disabledcmd(name, ui.config('ui', 'strict'))
1690 1689 doc = gettext(mod.__doc__).splitlines()[0]
1691 1690
1692 1691 msg = help.listexts(_("'%s' is provided by the following "
1693 1692 "extension:") % cmd, {ext: doc}, len(ext),
1694 1693 indent=4)
1695 1694 ui.write(minirst.format(msg, textwidth))
1696 1695 ui.write('\n\n')
1697 1696 ui.write(_('use "hg help extensions" for information on enabling '
1698 1697 'extensions\n'))
1699 1698
1700 1699 if name and name != 'shortlist':
1701 1700 i = None
1702 1701 if unknowncmd:
1703 1702 queries = (helpextcmd,)
1704 1703 else:
1705 1704 queries = (helptopic, helpcmd, helpext, helpextcmd)
1706 1705 for f in queries:
1707 1706 try:
1708 1707 f(name)
1709 1708 i = None
1710 1709 break
1711 1710 except error.UnknownCommand, inst:
1712 1711 i = inst
1713 1712 if i:
1714 1713 raise i
1715 1714
1716 1715 else:
1717 1716 # program name
1718 1717 if ui.verbose or with_version:
1719 1718 version_(ui)
1720 1719 else:
1721 1720 ui.status(_("Mercurial Distributed SCM\n"))
1722 1721 ui.status('\n')
1723 1722
1724 1723 # list of commands
1725 1724 if name == "shortlist":
1726 1725 header = _('basic commands:\n\n')
1727 1726 else:
1728 1727 header = _('list of commands:\n\n')
1729 1728
1730 1729 helplist(header)
1731 1730 if name != 'shortlist':
1732 1731 exts, maxlength = extensions.enabled()
1733 1732 text = help.listexts(_('enabled extensions:'), exts, maxlength)
1734 1733 if text:
1735 1734 ui.write("\n%s\n" % minirst.format(text, textwidth))
1736 1735
1737 1736 # list all option lists
1738 1737 opt_output = []
1739 1738 for title, options in option_lists:
1740 1739 opt_output.append(("\n%s" % title, None))
1741 1740 for shortopt, longopt, default, desc in options:
1742 1741 if _("DEPRECATED") in desc and not ui.verbose:
1743 1742 continue
1744 1743 opt_output.append(("%2s%s" % (shortopt and "-%s" % shortopt,
1745 1744 longopt and " --%s" % longopt),
1746 1745 "%s%s" % (desc,
1747 1746 default
1748 1747 and _(" (default: %s)") % default
1749 1748 or "")))
1750 1749
1751 1750 if not name:
1752 1751 ui.write(_("\nadditional help topics:\n\n"))
1753 1752 topics = []
1754 1753 for names, header, doc in help.helptable:
1755 1754 topics.append((sorted(names, key=len, reverse=True)[0], header))
1756 1755 topics_len = max([len(s[0]) for s in topics])
1757 1756 for t, desc in topics:
1758 1757 ui.write(" %-*s %s\n" % (topics_len, t, desc))
1759 1758
1760 1759 if opt_output:
1761 1760 opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])
1762 1761 for first, second in opt_output:
1763 1762 if second:
1764 1763 second = util.wrap(second, opts_len + 3)
1765 1764 ui.write(" %-*s %s\n" % (opts_len, first, second))
1766 1765 else:
1767 1766 ui.write("%s\n" % first)
1768 1767
1769 1768 def identify(ui, repo, source=None,
1770 1769 rev=None, num=None, id=None, branch=None, tags=None):
1771 1770 """identify the working copy or specified revision
1772 1771
1773 1772 With no revision, print a summary of the current state of the
1774 1773 repository.
1775 1774
1776 1775 Specifying a path to a repository root or Mercurial bundle will
1777 1776 cause lookup to operate on that repository/bundle.
1778 1777
1779 1778 This summary identifies the repository state using one or two
1780 1779 parent hash identifiers, followed by a "+" if there are
1781 1780 uncommitted changes in the working directory, a list of tags for
1782 1781 this revision and a branch name for non-default branches.
1783 1782 """
1784 1783
1785 1784 if not repo and not source:
1786 1785 raise util.Abort(_("There is no Mercurial repository here "
1787 1786 "(.hg not found)"))
1788 1787
1789 1788 hexfunc = ui.debugflag and hex or short
1790 1789 default = not (num or id or branch or tags)
1791 1790 output = []
1792 1791
1793 1792 revs = []
1794 1793 if source:
1795 1794 source, branches = hg.parseurl(ui.expandpath(source))
1796 1795 repo = hg.repository(ui, source)
1797 1796 revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
1798 1797
1799 1798 if not repo.local():
1800 1799 if not rev and revs:
1801 1800 rev = revs[0]
1802 1801 if not rev:
1803 1802 rev = "tip"
1804 1803 if num or branch or tags:
1805 1804 raise util.Abort(
1806 1805 "can't query remote revision number, branch, or tags")
1807 1806 output = [hexfunc(repo.lookup(rev))]
1808 1807 elif not rev:
1809 1808 ctx = repo[None]
1810 1809 parents = ctx.parents()
1811 1810 changed = False
1812 1811 if default or id or num:
1813 1812 changed = util.any(repo.status())
1814 1813 if default or id:
1815 1814 output = ["%s%s" % ('+'.join([hexfunc(p.node()) for p in parents]),
1816 1815 (changed) and "+" or "")]
1817 1816 if num:
1818 1817 output.append("%s%s" % ('+'.join([str(p.rev()) for p in parents]),
1819 1818 (changed) and "+" or ""))
1820 1819 else:
1821 1820 ctx = repo[rev]
1822 1821 if default or id:
1823 1822 output = [hexfunc(ctx.node())]
1824 1823 if num:
1825 1824 output.append(str(ctx.rev()))
1826 1825
1827 1826 if repo.local() and default and not ui.quiet:
1828 1827 b = encoding.tolocal(ctx.branch())
1829 1828 if b != 'default':
1830 1829 output.append("(%s)" % b)
1831 1830
1832 1831 # multiple tags for a single parent separated by '/'
1833 1832 t = "/".join(ctx.tags())
1834 1833 if t:
1835 1834 output.append(t)
1836 1835
1837 1836 if branch:
1838 1837 output.append(encoding.tolocal(ctx.branch()))
1839 1838
1840 1839 if tags:
1841 1840 output.extend(ctx.tags())
1842 1841
1843 1842 ui.write("%s\n" % ' '.join(output))
1844 1843
1845 1844 def import_(ui, repo, patch1, *patches, **opts):
1846 1845 """import an ordered set of patches
1847 1846
1848 1847 Import a list of patches and commit them individually (unless
1849 1848 --no-commit is specified).
1850 1849
1851 1850 If there are outstanding changes in the working directory, import
1852 1851 will abort unless given the -f/--force flag.
1853 1852
1854 1853 You can import a patch straight from a mail message. Even patches
1855 1854 as attachments work (to use the body part, it must have type
1856 1855 text/plain or text/x-patch). From and Subject headers of email
1857 1856 message are used as default committer and commit message. All
1858 1857 text/plain body parts before first diff are added to commit
1859 1858 message.
1860 1859
1861 1860 If the imported patch was generated by hg export, user and
1862 1861 description from patch override values from message headers and
1863 1862 body. Values given on command line with -m/--message and -u/--user
1864 1863 override these.
1865 1864
1866 1865 If --exact is specified, import will set the working directory to
1867 1866 the parent of each patch before applying it, and will abort if the
1868 1867 resulting changeset has a different ID than the one recorded in
1869 1868 the patch. This may happen due to character set problems or other
1870 1869 deficiencies in the text patch format.
1871 1870
1872 1871 With -s/--similarity, hg will attempt to discover renames and
1873 1872 copies in the patch in the same way as 'addremove'.
1874 1873
1875 1874 To read a patch from standard input, use "-" as the patch name. If
1876 1875 a URL is specified, the patch will be downloaded from it.
1877 1876 See :hg:`help dates` for a list of formats valid for -d/--date.
1878 1877 """
1879 1878 patches = (patch1,) + patches
1880 1879
1881 1880 date = opts.get('date')
1882 1881 if date:
1883 1882 opts['date'] = util.parsedate(date)
1884 1883
1885 1884 try:
1886 1885 sim = float(opts.get('similarity') or 0)
1887 1886 except ValueError:
1888 1887 raise util.Abort(_('similarity must be a number'))
1889 1888 if sim < 0 or sim > 100:
1890 1889 raise util.Abort(_('similarity must be between 0 and 100'))
1891 1890
1892 1891 if opts.get('exact') or not opts.get('force'):
1893 1892 cmdutil.bail_if_changed(repo)
1894 1893
1895 1894 d = opts["base"]
1896 1895 strip = opts["strip"]
1897 1896 wlock = lock = None
1898 1897
1899 1898 def tryone(ui, hunk):
1900 1899 tmpname, message, user, date, branch, nodeid, p1, p2 = \
1901 1900 patch.extract(ui, hunk)
1902 1901
1903 1902 if not tmpname:
1904 1903 return None
1905 1904 commitid = _('to working directory')
1906 1905
1907 1906 try:
1908 1907 cmdline_message = cmdutil.logmessage(opts)
1909 1908 if cmdline_message:
1910 1909 # pickup the cmdline msg
1911 1910 message = cmdline_message
1912 1911 elif message:
1913 1912 # pickup the patch msg
1914 1913 message = message.strip()
1915 1914 else:
1916 1915 # launch the editor
1917 1916 message = None
1918 1917 ui.debug('message:\n%s\n' % message)
1919 1918
1920 1919 wp = repo.parents()
1921 1920 if opts.get('exact'):
1922 1921 if not nodeid or not p1:
1923 1922 raise util.Abort(_('not a Mercurial patch'))
1924 1923 p1 = repo.lookup(p1)
1925 1924 p2 = repo.lookup(p2 or hex(nullid))
1926 1925
1927 1926 if p1 != wp[0].node():
1928 1927 hg.clean(repo, p1)
1929 1928 repo.dirstate.setparents(p1, p2)
1930 1929 elif p2:
1931 1930 try:
1932 1931 p1 = repo.lookup(p1)
1933 1932 p2 = repo.lookup(p2)
1934 1933 if p1 == wp[0].node():
1935 1934 repo.dirstate.setparents(p1, p2)
1936 1935 except error.RepoError:
1937 1936 pass
1938 1937 if opts.get('exact') or opts.get('import_branch'):
1939 1938 repo.dirstate.setbranch(branch or 'default')
1940 1939
1941 1940 files = {}
1942 1941 try:
1943 1942 patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
1944 1943 files=files, eolmode=None)
1945 1944 finally:
1946 1945 files = patch.updatedir(ui, repo, files,
1947 1946 similarity=sim / 100.0)
1948 1947 if not opts.get('no_commit'):
1949 1948 if opts.get('exact'):
1950 1949 m = None
1951 1950 else:
1952 1951 m = cmdutil.matchfiles(repo, files or [])
1953 1952 n = repo.commit(message, opts.get('user') or user,
1954 1953 opts.get('date') or date, match=m,
1955 1954 editor=cmdutil.commiteditor)
1956 1955 if opts.get('exact'):
1957 1956 if hex(n) != nodeid:
1958 1957 repo.rollback()
1959 1958 raise util.Abort(_('patch is damaged'
1960 1959 ' or loses information'))
1961 1960 # Force a dirstate write so that the next transaction
1962 1961 # backups an up-do-date file.
1963 1962 repo.dirstate.write()
1964 1963 if n:
1965 1964 commitid = short(n)
1966 1965
1967 1966 return commitid
1968 1967 finally:
1969 1968 os.unlink(tmpname)
1970 1969
1971 1970 try:
1972 1971 wlock = repo.wlock()
1973 1972 lock = repo.lock()
1974 1973 lastcommit = None
1975 1974 for p in patches:
1976 1975 pf = os.path.join(d, p)
1977 1976
1978 1977 if pf == '-':
1979 1978 ui.status(_("applying patch from stdin\n"))
1980 1979 pf = sys.stdin
1981 1980 else:
1982 1981 ui.status(_("applying %s\n") % p)
1983 1982 pf = url.open(ui, pf)
1984 1983
1985 1984 haspatch = False
1986 1985 for hunk in patch.split(pf):
1987 1986 commitid = tryone(ui, hunk)
1988 1987 if commitid:
1989 1988 haspatch = True
1990 1989 if lastcommit:
1991 1990 ui.status(_('applied %s\n') % lastcommit)
1992 1991 lastcommit = commitid
1993 1992
1994 1993 if not haspatch:
1995 1994 raise util.Abort(_('no diffs found'))
1996 1995
1997 1996 finally:
1998 1997 release(lock, wlock)
1999 1998
2000 1999 def incoming(ui, repo, source="default", **opts):
2001 2000 """show new changesets found in source
2002 2001
2003 2002 Show new changesets found in the specified path/URL or the default
2004 2003 pull location. These are the changesets that would have been pulled
2005 2004 if a pull at the time you issued this command.
2006 2005
2007 2006 For remote repository, using --bundle avoids downloading the
2008 2007 changesets twice if the incoming is followed by a pull.
2009 2008
2010 2009 See pull for valid source format details.
2011 2010 """
2012 2011 limit = cmdutil.loglimit(opts)
2013 2012 source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
2014 2013 other = hg.repository(cmdutil.remoteui(repo, opts), source)
2015 2014 ui.status(_('comparing with %s\n') % url.hidepassword(source))
2016 2015 revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
2017 2016 if revs:
2018 2017 revs = [other.lookup(rev) for rev in revs]
2019 2018 common, incoming, rheads = repo.findcommonincoming(other, heads=revs,
2020 2019 force=opts["force"])
2021 2020 if not incoming:
2022 2021 try:
2023 2022 os.unlink(opts["bundle"])
2024 2023 except:
2025 2024 pass
2026 2025 ui.status(_("no changes found\n"))
2027 2026 return 1
2028 2027
2029 2028 cleanup = None
2030 2029 try:
2031 2030 fname = opts["bundle"]
2032 2031 if fname or not other.local():
2033 2032 # create a bundle (uncompressed if other repo is not local)
2034 2033
2035 2034 if revs is None and other.capable('changegroupsubset'):
2036 2035 revs = rheads
2037 2036
2038 2037 if revs is None:
2039 2038 cg = other.changegroup(incoming, "incoming")
2040 2039 else:
2041 2040 cg = other.changegroupsubset(incoming, revs, 'incoming')
2042 2041 bundletype = other.local() and "HG10BZ" or "HG10UN"
2043 2042 fname = cleanup = changegroup.writebundle(cg, fname, bundletype)
2044 2043 # keep written bundle?
2045 2044 if opts["bundle"]:
2046 2045 cleanup = None
2047 2046 if not other.local():
2048 2047 # use the created uncompressed bundlerepo
2049 2048 other = bundlerepo.bundlerepository(ui, repo.root, fname)
2050 2049
2051 2050 o = other.changelog.nodesbetween(incoming, revs)[0]
2052 2051 if opts.get('newest_first'):
2053 2052 o.reverse()
2054 2053 displayer = cmdutil.show_changeset(ui, other, opts)
2055 2054 count = 0
2056 2055 for n in o:
2057 2056 if limit is not None and count >= limit:
2058 2057 break
2059 2058 parents = [p for p in other.changelog.parents(n) if p != nullid]
2060 2059 if opts.get('no_merges') and len(parents) == 2:
2061 2060 continue
2062 2061 count += 1
2063 2062 displayer.show(other[n])
2064 2063 displayer.close()
2065 2064 finally:
2066 2065 if hasattr(other, 'close'):
2067 2066 other.close()
2068 2067 if cleanup:
2069 2068 os.unlink(cleanup)
2070 2069
2071 2070 def init(ui, dest=".", **opts):
2072 2071 """create a new repository in the given directory
2073 2072
2074 2073 Initialize a new repository in the given directory. If the given
2075 2074 directory does not exist, it will be created.
2076 2075
2077 2076 If no directory is given, the current directory is used.
2078 2077
2079 2078 It is possible to specify an ``ssh://`` URL as the destination.
2080 2079 See :hg:`help urls` for more information.
2081 2080 """
2082 2081 hg.repository(cmdutil.remoteui(ui, opts), dest, create=1)
2083 2082
2084 2083 def locate(ui, repo, *pats, **opts):
2085 2084 """locate files matching specific patterns
2086 2085
2087 2086 Print files under Mercurial control in the working directory whose
2088 2087 names match the given patterns.
2089 2088
2090 2089 By default, this command searches all directories in the working
2091 2090 directory. To search just the current directory and its
2092 2091 subdirectories, use "--include .".
2093 2092
2094 2093 If no patterns are given to match, this command prints the names
2095 2094 of all files under Mercurial control in the working directory.
2096 2095
2097 2096 If you want to feed the output of this command into the "xargs"
2098 2097 command, use the -0 option to both this command and "xargs". This
2099 2098 will avoid the problem of "xargs" treating single filenames that
2100 2099 contain whitespace as multiple filenames.
2101 2100 """
2102 2101 end = opts.get('print0') and '\0' or '\n'
2103 2102 rev = opts.get('rev') or None
2104 2103
2105 2104 ret = 1
2106 2105 m = cmdutil.match(repo, pats, opts, default='relglob')
2107 2106 m.bad = lambda x, y: False
2108 2107 for abs in repo[rev].walk(m):
2109 2108 if not rev and abs not in repo.dirstate:
2110 2109 continue
2111 2110 if opts.get('fullpath'):
2112 2111 ui.write(repo.wjoin(abs), end)
2113 2112 else:
2114 2113 ui.write(((pats and m.rel(abs)) or abs), end)
2115 2114 ret = 0
2116 2115
2117 2116 return ret
2118 2117
2119 2118 def log(ui, repo, *pats, **opts):
2120 2119 """show revision history of entire repository or files
2121 2120
2122 2121 Print the revision history of the specified files or the entire
2123 2122 project.
2124 2123
2125 2124 File history is shown without following rename or copy history of
2126 2125 files. Use -f/--follow with a filename to follow history across
2127 2126 renames and copies. --follow without a filename will only show
2128 2127 ancestors or descendants of the starting revision. --follow-first
2129 2128 only follows the first parent of merge revisions.
2130 2129
2131 2130 If no revision range is specified, the default is tip:0 unless
2132 2131 --follow is set, in which case the working directory parent is
2133 2132 used as the starting revision.
2134 2133
2135 2134 See :hg:`help dates` for a list of formats valid for -d/--date.
2136 2135
2137 2136 By default this command prints revision number and changeset id,
2138 2137 tags, non-trivial parents, user, date and time, and a summary for
2139 2138 each commit. When the -v/--verbose switch is used, the list of
2140 2139 changed files and full commit message are shown.
2141 2140
2142 2141 NOTE: log -p/--patch may generate unexpected diff output for merge
2143 2142 changesets, as it will only compare the merge changeset against
2144 2143 its first parent. Also, only files different from BOTH parents
2145 2144 will appear in files:.
2146 2145 """
2147 2146
2148 2147 matchfn = cmdutil.match(repo, pats, opts)
2149 2148 limit = cmdutil.loglimit(opts)
2150 2149 count = 0
2151 2150
2152 2151 endrev = None
2153 2152 if opts.get('copies') and opts.get('rev'):
2154 2153 endrev = max(cmdutil.revrange(repo, opts.get('rev'))) + 1
2155 2154
2156 2155 df = False
2157 2156 if opts["date"]:
2158 2157 df = util.matchdate(opts["date"])
2159 2158
2160 2159 branches = opts.get('branch', []) + opts.get('only_branch', [])
2161 2160 opts['branch'] = [repo.lookupbranch(b) for b in branches]
2162 2161
2163 2162 displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn)
2164 2163 def prep(ctx, fns):
2165 2164 rev = ctx.rev()
2166 2165 parents = [p for p in repo.changelog.parentrevs(rev)
2167 2166 if p != nullrev]
2168 2167 if opts.get('no_merges') and len(parents) == 2:
2169 2168 return
2170 2169 if opts.get('only_merges') and len(parents) != 2:
2171 2170 return
2172 2171 if opts.get('branch') and ctx.branch() not in opts['branch']:
2173 2172 return
2174 2173 if df and not df(ctx.date()[0]):
2175 2174 return
2176 2175 if opts['user'] and not [k for k in opts['user'] if k in ctx.user()]:
2177 2176 return
2178 2177 if opts.get('keyword'):
2179 2178 for k in [kw.lower() for kw in opts['keyword']]:
2180 2179 if (k in ctx.user().lower() or
2181 2180 k in ctx.description().lower() or
2182 2181 k in " ".join(ctx.files()).lower()):
2183 2182 break
2184 2183 else:
2185 2184 return
2186 2185
2187 2186 copies = None
2188 2187 if opts.get('copies') and rev:
2189 2188 copies = []
2190 2189 getrenamed = templatekw.getrenamedfn(repo, endrev=endrev)
2191 2190 for fn in ctx.files():
2192 2191 rename = getrenamed(fn, rev)
2193 2192 if rename:
2194 2193 copies.append((fn, rename[0]))
2195 2194
2196 2195 displayer.show(ctx, copies=copies)
2197 2196
2198 2197 for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
2199 2198 if count == limit:
2200 2199 break
2201 2200 if displayer.flush(ctx.rev()):
2202 2201 count += 1
2203 2202 displayer.close()
2204 2203
2205 2204 def manifest(ui, repo, node=None, rev=None):
2206 2205 """output the current or given revision of the project manifest
2207 2206
2208 2207 Print a list of version controlled files for the given revision.
2209 2208 If no revision is given, the first parent of the working directory
2210 2209 is used, or the null revision if no revision is checked out.
2211 2210
2212 2211 With -v, print file permissions, symlink and executable bits.
2213 2212 With --debug, print file revision hashes.
2214 2213 """
2215 2214
2216 2215 if rev and node:
2217 2216 raise util.Abort(_("please specify just one revision"))
2218 2217
2219 2218 if not node:
2220 2219 node = rev
2221 2220
2222 2221 decor = {'l':'644 @ ', 'x':'755 * ', '':'644 '}
2223 2222 ctx = repo[node]
2224 2223 for f in ctx:
2225 2224 if ui.debugflag:
2226 2225 ui.write("%40s " % hex(ctx.manifest()[f]))
2227 2226 if ui.verbose:
2228 2227 ui.write(decor[ctx.flags(f)])
2229 2228 ui.write("%s\n" % f)
2230 2229
2231 2230 def merge(ui, repo, node=None, **opts):
2232 2231 """merge working directory with another revision
2233 2232
2234 2233 The current working directory is updated with all changes made in
2235 2234 the requested revision since the last common predecessor revision.
2236 2235
2237 2236 Files that changed between either parent are marked as changed for
2238 2237 the next commit and a commit must be performed before any further
2239 2238 updates to the repository are allowed. The next commit will have
2240 2239 two parents.
2241 2240
2242 2241 If no revision is specified, the working directory's parent is a
2243 2242 head revision, and the current branch contains exactly one other
2244 2243 head, the other head is merged with by default. Otherwise, an
2245 2244 explicit revision with which to merge with must be provided.
2246 2245 """
2247 2246
2248 2247 if opts.get('rev') and node:
2249 2248 raise util.Abort(_("please specify just one revision"))
2250 2249 if not node:
2251 2250 node = opts.get('rev')
2252 2251
2253 2252 if not node:
2254 2253 branch = repo.changectx(None).branch()
2255 2254 bheads = repo.branchheads(branch)
2256 2255 if len(bheads) > 2:
2257 2256 ui.warn(_("abort: branch '%s' has %d heads - "
2258 2257 "please merge with an explicit rev\n")
2259 2258 % (branch, len(bheads)))
2260 2259 ui.status(_("(run 'hg heads .' to see heads)\n"))
2261 2260 return False
2262 2261
2263 2262 parent = repo.dirstate.parents()[0]
2264 2263 if len(bheads) == 1:
2265 2264 if len(repo.heads()) > 1:
2266 2265 ui.warn(_("abort: branch '%s' has one head - "
2267 2266 "please merge with an explicit rev\n" % branch))
2268 2267 ui.status(_("(run 'hg heads' to see all heads)\n"))
2269 2268 return False
2270 2269 msg = _('there is nothing to merge')
2271 2270 if parent != repo.lookup(repo[None].branch()):
2272 2271 msg = _('%s - use "hg update" instead') % msg
2273 2272 raise util.Abort(msg)
2274 2273
2275 2274 if parent not in bheads:
2276 2275 raise util.Abort(_('working dir not at a head rev - '
2277 2276 'use "hg update" or merge with an explicit rev'))
2278 2277 node = parent == bheads[0] and bheads[-1] or bheads[0]
2279 2278
2280 2279 if opts.get('preview'):
2281 2280 # find nodes that are ancestors of p2 but not of p1
2282 2281 p1 = repo.lookup('.')
2283 2282 p2 = repo.lookup(node)
2284 2283 nodes = repo.changelog.findmissing(common=[p1], heads=[p2])
2285 2284
2286 2285 displayer = cmdutil.show_changeset(ui, repo, opts)
2287 2286 for node in nodes:
2288 2287 displayer.show(repo[node])
2289 2288 displayer.close()
2290 2289 return 0
2291 2290
2292 2291 return hg.merge(repo, node, force=opts.get('force'))
2293 2292
2294 2293 def outgoing(ui, repo, dest=None, **opts):
2295 2294 """show changesets not found in the destination
2296 2295
2297 2296 Show changesets not found in the specified destination repository
2298 2297 or the default push location. These are the changesets that would
2299 2298 be pushed if a push was requested.
2300 2299
2301 2300 See pull for details of valid destination formats.
2302 2301 """
2303 2302 limit = cmdutil.loglimit(opts)
2304 2303 dest = ui.expandpath(dest or 'default-push', dest or 'default')
2305 2304 dest, branches = hg.parseurl(dest, opts.get('branch'))
2306 2305 revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
2307 2306 if revs:
2308 2307 revs = [repo.lookup(rev) for rev in revs]
2309 2308
2310 2309 other = hg.repository(cmdutil.remoteui(repo, opts), dest)
2311 2310 ui.status(_('comparing with %s\n') % url.hidepassword(dest))
2312 2311 o = repo.findoutgoing(other, force=opts.get('force'))
2313 2312 if not o:
2314 2313 ui.status(_("no changes found\n"))
2315 2314 return 1
2316 2315 o = repo.changelog.nodesbetween(o, revs)[0]
2317 2316 if opts.get('newest_first'):
2318 2317 o.reverse()
2319 2318 displayer = cmdutil.show_changeset(ui, repo, opts)
2320 2319 count = 0
2321 2320 for n in o:
2322 2321 if limit is not None and count >= limit:
2323 2322 break
2324 2323 parents = [p for p in repo.changelog.parents(n) if p != nullid]
2325 2324 if opts.get('no_merges') and len(parents) == 2:
2326 2325 continue
2327 2326 count += 1
2328 2327 displayer.show(repo[n])
2329 2328 displayer.close()
2330 2329
2331 2330 def parents(ui, repo, file_=None, **opts):
2332 2331 """show the parents of the working directory or revision
2333 2332
2334 2333 Print the working directory's parent revisions. If a revision is
2335 2334 given via -r/--rev, the parent of that revision will be printed.
2336 2335 If a file argument is given, the revision in which the file was
2337 2336 last changed (before the working directory revision or the
2338 2337 argument to --rev if given) is printed.
2339 2338 """
2340 2339 rev = opts.get('rev')
2341 2340 if rev:
2342 2341 ctx = repo[rev]
2343 2342 else:
2344 2343 ctx = repo[None]
2345 2344
2346 2345 if file_:
2347 2346 m = cmdutil.match(repo, (file_,), opts)
2348 2347 if m.anypats() or len(m.files()) != 1:
2349 2348 raise util.Abort(_('can only specify an explicit filename'))
2350 2349 file_ = m.files()[0]
2351 2350 filenodes = []
2352 2351 for cp in ctx.parents():
2353 2352 if not cp:
2354 2353 continue
2355 2354 try:
2356 2355 filenodes.append(cp.filenode(file_))
2357 2356 except error.LookupError:
2358 2357 pass
2359 2358 if not filenodes:
2360 2359 raise util.Abort(_("'%s' not found in manifest!") % file_)
2361 2360 fl = repo.file(file_)
2362 2361 p = [repo.lookup(fl.linkrev(fl.rev(fn))) for fn in filenodes]
2363 2362 else:
2364 2363 p = [cp.node() for cp in ctx.parents()]
2365 2364
2366 2365 displayer = cmdutil.show_changeset(ui, repo, opts)
2367 2366 for n in p:
2368 2367 if n != nullid:
2369 2368 displayer.show(repo[n])
2370 2369 displayer.close()
2371 2370
2372 2371 def paths(ui, repo, search=None):
2373 2372 """show aliases for remote repositories
2374 2373
2375 2374 Show definition of symbolic path name NAME. If no name is given,
2376 2375 show definition of all available names.
2377 2376
2378 2377 Path names are defined in the [paths] section of
2379 2378 ``/etc/mercurial/hgrc`` and ``$HOME/.hgrc``. If run inside a
2380 2379 repository, ``.hg/hgrc`` is used, too.
2381 2380
2382 2381 The path names ``default`` and ``default-push`` have a special
2383 2382 meaning. When performing a push or pull operation, they are used
2384 2383 as fallbacks if no location is specified on the command-line.
2385 2384 When ``default-push`` is set, it will be used for push and
2386 2385 ``default`` will be used for pull; otherwise ``default`` is used
2387 2386 as the fallback for both. When cloning a repository, the clone
2388 2387 source is written as ``default`` in ``.hg/hgrc``. Note that
2389 2388 ``default`` and ``default-push`` apply to all inbound (e.g.
2390 2389 :hg:`incoming`) and outbound (e.g. :hg:`outgoing`, :hg:`email` and
2391 2390 :hg:`bundle`) operations.
2392 2391
2393 2392 See :hg:`help urls` for more information.
2394 2393 """
2395 2394 if search:
2396 2395 for name, path in ui.configitems("paths"):
2397 2396 if name == search:
2398 2397 ui.write("%s\n" % url.hidepassword(path))
2399 2398 return
2400 2399 ui.warn(_("not found!\n"))
2401 2400 return 1
2402 2401 else:
2403 2402 for name, path in ui.configitems("paths"):
2404 2403 ui.write("%s = %s\n" % (name, url.hidepassword(path)))
2405 2404
2406 2405 def postincoming(ui, repo, modheads, optupdate, checkout):
2407 2406 if modheads == 0:
2408 2407 return
2409 2408 if optupdate:
2410 2409 if (modheads <= 1 or len(repo.branchheads()) == 1) or checkout:
2411 2410 return hg.update(repo, checkout)
2412 2411 else:
2413 2412 ui.status(_("not updating, since new heads added\n"))
2414 2413 if modheads > 1:
2415 2414 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))
2416 2415 else:
2417 2416 ui.status(_("(run 'hg update' to get a working copy)\n"))
2418 2417
2419 2418 def pull(ui, repo, source="default", **opts):
2420 2419 """pull changes from the specified source
2421 2420
2422 2421 Pull changes from a remote repository to a local one.
2423 2422
2424 2423 This finds all changes from the repository at the specified path
2425 2424 or URL and adds them to a local repository (the current one unless
2426 2425 -R is specified). By default, this does not update the copy of the
2427 2426 project in the working directory.
2428 2427
2429 2428 Use hg incoming if you want to see what would have been added by a
2430 2429 pull at the time you issued this command. If you then decide to
2431 2430 added those changes to the repository, you should use pull -r X
2432 2431 where X is the last changeset listed by hg incoming.
2433 2432
2434 2433 If SOURCE is omitted, the 'default' path will be used.
2435 2434 See :hg:`help urls` for more information.
2436 2435 """
2437 2436 source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
2438 2437 other = hg.repository(cmdutil.remoteui(repo, opts), source)
2439 2438 ui.status(_('pulling from %s\n') % url.hidepassword(source))
2440 2439 revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
2441 2440 if revs:
2442 2441 try:
2443 2442 revs = [other.lookup(rev) for rev in revs]
2444 2443 except error.CapabilityError:
2445 2444 err = _("Other repository doesn't support revision lookup, "
2446 2445 "so a rev cannot be specified.")
2447 2446 raise util.Abort(err)
2448 2447
2449 2448 modheads = repo.pull(other, heads=revs, force=opts.get('force'))
2450 2449 if checkout:
2451 2450 checkout = str(repo.changelog.rev(other.lookup(checkout)))
2452 2451 return postincoming(ui, repo, modheads, opts.get('update'), checkout)
2453 2452
2454 2453 def push(ui, repo, dest=None, **opts):
2455 2454 """push changes to the specified destination
2456 2455
2457 2456 Push changes from the local repository to the specified destination.
2458 2457
2459 2458 This is the symmetrical operation for pull. It moves changes from
2460 2459 the current repository to a different one. If the destination is
2461 2460 local this is identical to a pull in that directory from the
2462 2461 current one.
2463 2462
2464 2463 By default, push will refuse to run if it detects the result would
2465 2464 increase the number of remote heads. This generally indicates the
2466 2465 user forgot to pull and merge before pushing.
2467 2466
2468 2467 If -r/--rev is used, the named revision and all its ancestors will
2469 2468 be pushed to the remote repository.
2470 2469
2471 2470 Please see :hg:`help urls` for important details about ``ssh://``
2472 2471 URLs. If DESTINATION is omitted, a default path will be used.
2473 2472 """
2474 2473 dest = ui.expandpath(dest or 'default-push', dest or 'default')
2475 2474 dest, branches = hg.parseurl(dest, opts.get('branch'))
2476 2475 revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
2477 2476 other = hg.repository(cmdutil.remoteui(repo, opts), dest)
2478 2477 ui.status(_('pushing to %s\n') % url.hidepassword(dest))
2479 2478 if revs:
2480 2479 revs = [repo.lookup(rev) for rev in revs]
2481 2480
2482 2481 # push subrepos depth-first for coherent ordering
2483 2482 c = repo['']
2484 2483 subs = c.substate # only repos that are committed
2485 2484 for s in sorted(subs):
2486 2485 if not c.sub(s).push(opts.get('force')):
2487 2486 return False
2488 2487
2489 2488 r = repo.push(other, opts.get('force'), revs=revs)
2490 2489 return r == 0
2491 2490
2492 2491 def recover(ui, repo):
2493 2492 """roll back an interrupted transaction
2494 2493
2495 2494 Recover from an interrupted commit or pull.
2496 2495
2497 2496 This command tries to fix the repository status after an
2498 2497 interrupted operation. It should only be necessary when Mercurial
2499 2498 suggests it.
2500 2499 """
2501 2500 if repo.recover():
2502 2501 return hg.verify(repo)
2503 2502 return 1
2504 2503
2505 2504 def remove(ui, repo, *pats, **opts):
2506 2505 """remove the specified files on the next commit
2507 2506
2508 2507 Schedule the indicated files for removal from the repository.
2509 2508
2510 2509 This only removes files from the current branch, not from the
2511 2510 entire project history. -A/--after can be used to remove only
2512 2511 files that have already been deleted, -f/--force can be used to
2513 2512 force deletion, and -Af can be used to remove files from the next
2514 2513 revision without deleting them from the working directory.
2515 2514
2516 2515 The following table details the behavior of remove for different
2517 2516 file states (columns) and option combinations (rows). The file
2518 2517 states are Added [A], Clean [C], Modified [M] and Missing [!] (as
2519 2518 reported by hg status). The actions are Warn, Remove (from branch)
2520 2519 and Delete (from disk)::
2521 2520
2522 2521 A C M !
2523 2522 none W RD W R
2524 2523 -f R RD RD R
2525 2524 -A W W W R
2526 2525 -Af R R R R
2527 2526
2528 2527 This command schedules the files to be removed at the next commit.
2529 2528 To undo a remove before that, see hg revert.
2530 2529 """
2531 2530
2532 2531 after, force = opts.get('after'), opts.get('force')
2533 2532 if not pats and not after:
2534 2533 raise util.Abort(_('no files specified'))
2535 2534
2536 2535 m = cmdutil.match(repo, pats, opts)
2537 2536 s = repo.status(match=m, clean=True)
2538 2537 modified, added, deleted, clean = s[0], s[1], s[3], s[6]
2539 2538
2540 2539 for f in m.files():
2541 2540 if f not in repo.dirstate and not os.path.isdir(m.rel(f)):
2542 2541 ui.warn(_('not removing %s: file is untracked\n') % m.rel(f))
2543 2542
2544 2543 def warn(files, reason):
2545 2544 for f in files:
2546 2545 ui.warn(_('not removing %s: file %s (use -f to force removal)\n')
2547 2546 % (m.rel(f), reason))
2548 2547
2549 2548 if force:
2550 2549 remove, forget = modified + deleted + clean, added
2551 2550 elif after:
2552 2551 remove, forget = deleted, []
2553 2552 warn(modified + added + clean, _('still exists'))
2554 2553 else:
2555 2554 remove, forget = deleted + clean, []
2556 2555 warn(modified, _('is modified'))
2557 2556 warn(added, _('has been marked for add'))
2558 2557
2559 2558 for f in sorted(remove + forget):
2560 2559 if ui.verbose or not m.exact(f):
2561 2560 ui.status(_('removing %s\n') % m.rel(f))
2562 2561
2563 2562 repo.forget(forget)
2564 2563 repo.remove(remove, unlink=not after)
2565 2564
2566 2565 def rename(ui, repo, *pats, **opts):
2567 2566 """rename files; equivalent of copy + remove
2568 2567
2569 2568 Mark dest as copies of sources; mark sources for deletion. If dest
2570 2569 is a directory, copies are put in that directory. If dest is a
2571 2570 file, there can only be one source.
2572 2571
2573 2572 By default, this command copies the contents of files as they
2574 2573 exist in the working directory. If invoked with -A/--after, the
2575 2574 operation is recorded, but no copying is performed.
2576 2575
2577 2576 This command takes effect at the next commit. To undo a rename
2578 2577 before that, see hg revert.
2579 2578 """
2580 2579 wlock = repo.wlock(False)
2581 2580 try:
2582 2581 return cmdutil.copy(ui, repo, pats, opts, rename=True)
2583 2582 finally:
2584 2583 wlock.release()
2585 2584
2586 2585 def resolve(ui, repo, *pats, **opts):
2587 2586 """various operations to help finish a merge
2588 2587
2589 2588 This command includes several actions that are often useful while
2590 2589 performing a merge, after running ``merge`` but before running
2591 2590 ``commit``. (It is only meaningful if your working directory has
2592 2591 two parents.) It is most relevant for merges with unresolved
2593 2592 conflicts, which are typically a result of non-interactive merging with
2594 2593 ``internal:merge`` or a command-line merge tool like ``diff3``.
2595 2594
2596 2595 The available actions are:
2597 2596
2598 2597 1) list files that were merged with conflicts (U, for unresolved)
2599 2598 and without conflicts (R, for resolved): ``hg resolve -l``
2600 2599 (this is like ``status`` for merges)
2601 2600 2) record that you have resolved conflicts in certain files:
2602 2601 ``hg resolve -m [file ...]`` (default: mark all unresolved files)
2603 2602 3) forget that you have resolved conflicts in certain files:
2604 2603 ``hg resolve -u [file ...]`` (default: unmark all resolved files)
2605 2604 4) discard your current attempt(s) at resolving conflicts and
2606 2605 restart the merge from scratch: ``hg resolve file...``
2607 2606 (or ``-a`` for all unresolved files)
2608 2607
2609 2608 Note that Mercurial will not let you commit files with unresolved merge
2610 2609 conflicts. You must use ``hg resolve -m ...`` before you can commit
2611 2610 after a conflicting merge.
2612 2611 """
2613 2612
2614 2613 all, mark, unmark, show, nostatus = \
2615 2614 [opts.get(o) for o in 'all mark unmark list no_status'.split()]
2616 2615
2617 2616 if (show and (mark or unmark)) or (mark and unmark):
2618 2617 raise util.Abort(_("too many options specified"))
2619 2618 if pats and all:
2620 2619 raise util.Abort(_("can't specify --all and patterns"))
2621 2620 if not (all or pats or show or mark or unmark):
2622 2621 raise util.Abort(_('no files or directories specified; '
2623 2622 'use --all to remerge all files'))
2624 2623
2625 2624 ms = mergemod.mergestate(repo)
2626 2625 m = cmdutil.match(repo, pats, opts)
2627 2626
2628 2627 for f in ms:
2629 2628 if m(f):
2630 2629 if show:
2631 2630 if nostatus:
2632 2631 ui.write("%s\n" % f)
2633 2632 else:
2634 2633 ui.write("%s %s\n" % (ms[f].upper(), f),
2635 2634 label='resolve.' +
2636 2635 {'u': 'unresolved', 'r': 'resolved'}[ms[f]])
2637 2636 elif mark:
2638 2637 ms.mark(f, "r")
2639 2638 elif unmark:
2640 2639 ms.mark(f, "u")
2641 2640 else:
2642 2641 wctx = repo[None]
2643 2642 mctx = wctx.parents()[-1]
2644 2643
2645 2644 # backup pre-resolve (merge uses .orig for its own purposes)
2646 2645 a = repo.wjoin(f)
2647 2646 util.copyfile(a, a + ".resolve")
2648 2647
2649 2648 # resolve file
2650 2649 ms.resolve(f, wctx, mctx)
2651 2650
2652 2651 # replace filemerge's .orig file with our resolve file
2653 2652 util.rename(a + ".resolve", a + ".orig")
2654 2653
2655 2654 def revert(ui, repo, *pats, **opts):
2656 2655 """restore individual files or directories to an earlier state
2657 2656
2658 2657 (Use update -r to check out earlier revisions, revert does not
2659 2658 change the working directory parents.)
2660 2659
2661 2660 With no revision specified, revert the named files or directories
2662 2661 to the contents they had in the parent of the working directory.
2663 2662 This restores the contents of the affected files to an unmodified
2664 2663 state and unschedules adds, removes, copies, and renames. If the
2665 2664 working directory has two parents, you must explicitly specify a
2666 2665 revision.
2667 2666
2668 2667 Using the -r/--rev option, revert the given files or directories
2669 2668 to their contents as of a specific revision. This can be helpful
2670 2669 to "roll back" some or all of an earlier change. See :hg:`help
2671 2670 dates` for a list of formats valid for -d/--date.
2672 2671
2673 2672 Revert modifies the working directory. It does not commit any
2674 2673 changes, or change the parent of the working directory. If you
2675 2674 revert to a revision other than the parent of the working
2676 2675 directory, the reverted files will thus appear modified
2677 2676 afterwards.
2678 2677
2679 2678 If a file has been deleted, it is restored. If the executable mode
2680 2679 of a file was changed, it is reset.
2681 2680
2682 2681 If names are given, all files matching the names are reverted.
2683 2682 If no arguments are given, no files are reverted.
2684 2683
2685 2684 Modified files are saved with a .orig suffix before reverting.
2686 2685 To disable these backups, use --no-backup.
2687 2686 """
2688 2687
2689 2688 if opts["date"]:
2690 2689 if opts["rev"]:
2691 2690 raise util.Abort(_("you can't specify a revision and a date"))
2692 2691 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"])
2693 2692
2694 2693 if not pats and not opts.get('all'):
2695 2694 raise util.Abort(_('no files or directories specified; '
2696 2695 'use --all to revert the whole repo'))
2697 2696
2698 2697 parent, p2 = repo.dirstate.parents()
2699 2698 if not opts.get('rev') and p2 != nullid:
2700 2699 raise util.Abort(_('uncommitted merge - please provide a '
2701 2700 'specific revision'))
2702 2701 ctx = repo[opts.get('rev')]
2703 2702 node = ctx.node()
2704 2703 mf = ctx.manifest()
2705 2704 if node == parent:
2706 2705 pmf = mf
2707 2706 else:
2708 2707 pmf = None
2709 2708
2710 2709 # need all matching names in dirstate and manifest of target rev,
2711 2710 # so have to walk both. do not print errors if files exist in one
2712 2711 # but not other.
2713 2712
2714 2713 names = {}
2715 2714
2716 2715 wlock = repo.wlock()
2717 2716 try:
2718 2717 # walk dirstate.
2719 2718
2720 2719 m = cmdutil.match(repo, pats, opts)
2721 2720 m.bad = lambda x, y: False
2722 2721 for abs in repo.walk(m):
2723 2722 names[abs] = m.rel(abs), m.exact(abs)
2724 2723
2725 2724 # walk target manifest.
2726 2725
2727 2726 def badfn(path, msg):
2728 2727 if path in names:
2729 2728 return
2730 2729 path_ = path + '/'
2731 2730 for f in names:
2732 2731 if f.startswith(path_):
2733 2732 return
2734 2733 ui.warn("%s: %s\n" % (m.rel(path), msg))
2735 2734
2736 2735 m = cmdutil.match(repo, pats, opts)
2737 2736 m.bad = badfn
2738 2737 for abs in repo[node].walk(m):
2739 2738 if abs not in names:
2740 2739 names[abs] = m.rel(abs), m.exact(abs)
2741 2740
2742 2741 m = cmdutil.matchfiles(repo, names)
2743 2742 changes = repo.status(match=m)[:4]
2744 2743 modified, added, removed, deleted = map(set, changes)
2745 2744
2746 2745 # if f is a rename, also revert the source
2747 2746 cwd = repo.getcwd()
2748 2747 for f in added:
2749 2748 src = repo.dirstate.copied(f)
2750 2749 if src and src not in names and repo.dirstate[src] == 'r':
2751 2750 removed.add(src)
2752 2751 names[src] = (repo.pathto(src, cwd), True)
2753 2752
2754 2753 def removeforget(abs):
2755 2754 if repo.dirstate[abs] == 'a':
2756 2755 return _('forgetting %s\n')
2757 2756 return _('removing %s\n')
2758 2757
2759 2758 revert = ([], _('reverting %s\n'))
2760 2759 add = ([], _('adding %s\n'))
2761 2760 remove = ([], removeforget)
2762 2761 undelete = ([], _('undeleting %s\n'))
2763 2762
2764 2763 disptable = (
2765 2764 # dispatch table:
2766 2765 # file state
2767 2766 # action if in target manifest
2768 2767 # action if not in target manifest
2769 2768 # make backup if in target manifest
2770 2769 # make backup if not in target manifest
2771 2770 (modified, revert, remove, True, True),
2772 2771 (added, revert, remove, True, False),
2773 2772 (removed, undelete, None, False, False),
2774 2773 (deleted, revert, remove, False, False),
2775 2774 )
2776 2775
2777 2776 for abs, (rel, exact) in sorted(names.items()):
2778 2777 mfentry = mf.get(abs)
2779 2778 target = repo.wjoin(abs)
2780 2779 def handle(xlist, dobackup):
2781 2780 xlist[0].append(abs)
2782 2781 if dobackup and not opts.get('no_backup') and util.lexists(target):
2783 2782 bakname = "%s.orig" % rel
2784 2783 ui.note(_('saving current version of %s as %s\n') %
2785 2784 (rel, bakname))
2786 2785 if not opts.get('dry_run'):
2787 2786 util.copyfile(target, bakname)
2788 2787 if ui.verbose or not exact:
2789 2788 msg = xlist[1]
2790 2789 if not isinstance(msg, basestring):
2791 2790 msg = msg(abs)
2792 2791 ui.status(msg % rel)
2793 2792 for table, hitlist, misslist, backuphit, backupmiss in disptable:
2794 2793 if abs not in table:
2795 2794 continue
2796 2795 # file has changed in dirstate
2797 2796 if mfentry:
2798 2797 handle(hitlist, backuphit)
2799 2798 elif misslist is not None:
2800 2799 handle(misslist, backupmiss)
2801 2800 break
2802 2801 else:
2803 2802 if abs not in repo.dirstate:
2804 2803 if mfentry:
2805 2804 handle(add, True)
2806 2805 elif exact:
2807 2806 ui.warn(_('file not managed: %s\n') % rel)
2808 2807 continue
2809 2808 # file has not changed in dirstate
2810 2809 if node == parent:
2811 2810 if exact:
2812 2811 ui.warn(_('no changes needed to %s\n') % rel)
2813 2812 continue
2814 2813 if pmf is None:
2815 2814 # only need parent manifest in this unlikely case,
2816 2815 # so do not read by default
2817 2816 pmf = repo[parent].manifest()
2818 2817 if abs in pmf:
2819 2818 if mfentry:
2820 2819 # if version of file is same in parent and target
2821 2820 # manifests, do nothing
2822 2821 if (pmf[abs] != mfentry or
2823 2822 pmf.flags(abs) != mf.flags(abs)):
2824 2823 handle(revert, False)
2825 2824 else:
2826 2825 handle(remove, False)
2827 2826
2828 2827 if not opts.get('dry_run'):
2829 2828 def checkout(f):
2830 2829 fc = ctx[f]
2831 2830 repo.wwrite(f, fc.data(), fc.flags())
2832 2831
2833 2832 audit_path = util.path_auditor(repo.root)
2834 2833 for f in remove[0]:
2835 2834 if repo.dirstate[f] == 'a':
2836 2835 repo.dirstate.forget(f)
2837 2836 continue
2838 2837 audit_path(f)
2839 2838 try:
2840 2839 util.unlink(repo.wjoin(f))
2841 2840 except OSError:
2842 2841 pass
2843 2842 repo.dirstate.remove(f)
2844 2843
2845 2844 normal = None
2846 2845 if node == parent:
2847 2846 # We're reverting to our parent. If possible, we'd like status
2848 2847 # to report the file as clean. We have to use normallookup for
2849 2848 # merges to avoid losing information about merged/dirty files.
2850 2849 if p2 != nullid:
2851 2850 normal = repo.dirstate.normallookup
2852 2851 else:
2853 2852 normal = repo.dirstate.normal
2854 2853 for f in revert[0]:
2855 2854 checkout(f)
2856 2855 if normal:
2857 2856 normal(f)
2858 2857
2859 2858 for f in add[0]:
2860 2859 checkout(f)
2861 2860 repo.dirstate.add(f)
2862 2861
2863 2862 normal = repo.dirstate.normallookup
2864 2863 if node == parent and p2 == nullid:
2865 2864 normal = repo.dirstate.normal
2866 2865 for f in undelete[0]:
2867 2866 checkout(f)
2868 2867 normal(f)
2869 2868
2870 2869 finally:
2871 2870 wlock.release()
2872 2871
2873 2872 def rollback(ui, repo, **opts):
2874 2873 """roll back the last transaction (dangerous)
2875 2874
2876 2875 This command should be used with care. There is only one level of
2877 2876 rollback, and there is no way to undo a rollback. It will also
2878 2877 restore the dirstate at the time of the last transaction, losing
2879 2878 any dirstate changes since that time. This command does not alter
2880 2879 the working directory.
2881 2880
2882 2881 Transactions are used to encapsulate the effects of all commands
2883 2882 that create new changesets or propagate existing changesets into a
2884 2883 repository. For example, the following commands are transactional,
2885 2884 and their effects can be rolled back:
2886 2885
2887 2886 - commit
2888 2887 - import
2889 2888 - pull
2890 2889 - push (with this repository as the destination)
2891 2890 - unbundle
2892 2891
2893 2892 This command is not intended for use on public repositories. Once
2894 2893 changes are visible for pull by other users, rolling a transaction
2895 2894 back locally is ineffective (someone else may already have pulled
2896 2895 the changes). Furthermore, a race is possible with readers of the
2897 2896 repository; for example an in-progress pull from the repository
2898 2897 may fail if a rollback is performed.
2899 2898 """
2900 2899 repo.rollback(opts.get('dry_run'))
2901 2900
2902 2901 def root(ui, repo):
2903 2902 """print the root (top) of the current working directory
2904 2903
2905 2904 Print the root directory of the current repository.
2906 2905 """
2907 2906 ui.write(repo.root + "\n")
2908 2907
2909 2908 def serve(ui, repo, **opts):
2910 2909 """start stand-alone webserver
2911 2910
2912 2911 Start a local HTTP repository browser and pull server. You can use
2913 2912 this for ad-hoc sharing and browing of repositories. It is
2914 2913 recommended to use a real web server to serve a repository for
2915 2914 longer periods of time.
2916 2915
2917 2916 Please note that the server does not implement access control.
2918 2917 This means that, by default, anybody can read from the server and
2919 2918 nobody can write to it by default. Set the ``web.allow_push``
2920 2919 option to ``*`` to allow everybody to push to the server. You
2921 2920 should use a real web server if you need to authenticate users.
2922 2921
2923 2922 By default, the server logs accesses to stdout and errors to
2924 2923 stderr. Use the -A/--accesslog and -E/--errorlog options to log to
2925 2924 files.
2926 2925
2927 2926 To have the server choose a free port number to listen on, specify
2928 2927 a port number of 0; in this case, the server will print the port
2929 2928 number it uses.
2930 2929 """
2931 2930
2932 2931 if opts["stdio"]:
2933 2932 if repo is None:
2934 2933 raise error.RepoError(_("There is no Mercurial repository here"
2935 2934 " (.hg not found)"))
2936 2935 s = sshserver.sshserver(ui, repo)
2937 2936 s.serve_forever()
2938 2937
2939 2938 # this way we can check if something was given in the command-line
2940 2939 if opts.get('port'):
2941 2940 opts['port'] = int(opts.get('port'))
2942 2941
2943 2942 baseui = repo and repo.baseui or ui
2944 2943 optlist = ("name templates style address port prefix ipv6"
2945 2944 " accesslog errorlog certificate encoding")
2946 2945 for o in optlist.split():
2947 2946 val = opts.get(o, '')
2948 2947 if val in (None, ''): # should check against default options instead
2949 2948 continue
2950 2949 baseui.setconfig("web", o, val)
2951 2950 if repo and repo.ui != baseui:
2952 2951 repo.ui.setconfig("web", o, val)
2953 2952
2954 2953 o = opts.get('web_conf') or opts.get('webdir_conf')
2955 2954 if not o:
2956 2955 if not repo:
2957 2956 raise error.RepoError(_("There is no Mercurial repository"
2958 2957 " here (.hg not found)"))
2959 2958 o = repo.root
2960 2959
2961 2960 app = hgweb.hgweb(o, baseui=ui)
2962 2961
2963 2962 class service(object):
2964 2963 def init(self):
2965 2964 util.set_signal_handler()
2966 2965 self.httpd = hgweb.server.create_server(ui, app)
2967 2966
2968 2967 if opts['port'] and not ui.verbose:
2969 2968 return
2970 2969
2971 2970 if self.httpd.prefix:
2972 2971 prefix = self.httpd.prefix.strip('/') + '/'
2973 2972 else:
2974 2973 prefix = ''
2975 2974
2976 2975 port = ':%d' % self.httpd.port
2977 2976 if port == ':80':
2978 2977 port = ''
2979 2978
2980 2979 bindaddr = self.httpd.addr
2981 2980 if bindaddr == '0.0.0.0':
2982 2981 bindaddr = '*'
2983 2982 elif ':' in bindaddr: # IPv6
2984 2983 bindaddr = '[%s]' % bindaddr
2985 2984
2986 2985 fqaddr = self.httpd.fqaddr
2987 2986 if ':' in fqaddr:
2988 2987 fqaddr = '[%s]' % fqaddr
2989 2988 if opts['port']:
2990 2989 write = ui.status
2991 2990 else:
2992 2991 write = ui.write
2993 2992 write(_('listening at http://%s%s/%s (bound to %s:%d)\n') %
2994 2993 (fqaddr, port, prefix, bindaddr, self.httpd.port))
2995 2994
2996 2995 def run(self):
2997 2996 self.httpd.serve_forever()
2998 2997
2999 2998 service = service()
3000 2999
3001 3000 cmdutil.service(opts, initfn=service.init, runfn=service.run)
3002 3001
3003 3002 def status(ui, repo, *pats, **opts):
3004 3003 """show changed files in the working directory
3005 3004
3006 3005 Show status of files in the repository. If names are given, only
3007 3006 files that match are shown. Files that are clean or ignored or
3008 3007 the source of a copy/move operation, are not listed unless
3009 3008 -c/--clean, -i/--ignored, -C/--copies or -A/--all are given.
3010 3009 Unless options described with "show only ..." are given, the
3011 3010 options -mardu are used.
3012 3011
3013 3012 Option -q/--quiet hides untracked (unknown and ignored) files
3014 3013 unless explicitly requested with -u/--unknown or -i/--ignored.
3015 3014
3016 3015 NOTE: status may appear to disagree with diff if permissions have
3017 3016 changed or a merge has occurred. The standard diff format does not
3018 3017 report permission changes and diff only reports changes relative
3019 3018 to one merge parent.
3020 3019
3021 3020 If one revision is given, it is used as the base revision.
3022 3021 If two revisions are given, the differences between them are
3023 3022 shown. The --change option can also be used as a shortcut to list
3024 3023 the changed files of a revision from its first parent.
3025 3024
3026 3025 The codes used to show the status of files are::
3027 3026
3028 3027 M = modified
3029 3028 A = added
3030 3029 R = removed
3031 3030 C = clean
3032 3031 ! = missing (deleted by non-hg command, but still tracked)
3033 3032 ? = not tracked
3034 3033 I = ignored
3035 3034 = origin of the previous file listed as A (added)
3036 3035 """
3037 3036
3038 3037 revs = opts.get('rev')
3039 3038 change = opts.get('change')
3040 3039
3041 3040 if revs and change:
3042 3041 msg = _('cannot specify --rev and --change at the same time')
3043 3042 raise util.Abort(msg)
3044 3043 elif change:
3045 3044 node2 = repo.lookup(change)
3046 3045 node1 = repo[node2].parents()[0].node()
3047 3046 else:
3048 3047 node1, node2 = cmdutil.revpair(repo, revs)
3049 3048
3050 3049 cwd = (pats and repo.getcwd()) or ''
3051 3050 end = opts.get('print0') and '\0' or '\n'
3052 3051 copy = {}
3053 3052 states = 'modified added removed deleted unknown ignored clean'.split()
3054 3053 show = [k for k in states if opts.get(k)]
3055 3054 if opts.get('all'):
3056 3055 show += ui.quiet and (states[:4] + ['clean']) or states
3057 3056 if not show:
3058 3057 show = ui.quiet and states[:4] or states[:5]
3059 3058
3060 3059 stat = repo.status(node1, node2, cmdutil.match(repo, pats, opts),
3061 3060 'ignored' in show, 'clean' in show, 'unknown' in show)
3062 3061 changestates = zip(states, 'MAR!?IC', stat)
3063 3062
3064 3063 if (opts.get('all') or opts.get('copies')) and not opts.get('no_status'):
3065 3064 ctxn = repo[nullid]
3066 3065 ctx1 = repo[node1]
3067 3066 ctx2 = repo[node2]
3068 3067 added = stat[1]
3069 3068 if node2 is None:
3070 3069 added = stat[0] + stat[1] # merged?
3071 3070
3072 3071 for k, v in copies.copies(repo, ctx1, ctx2, ctxn)[0].iteritems():
3073 3072 if k in added:
3074 3073 copy[k] = v
3075 3074 elif v in added:
3076 3075 copy[v] = k
3077 3076
3078 3077 for state, char, files in changestates:
3079 3078 if state in show:
3080 3079 format = "%s %%s%s" % (char, end)
3081 3080 if opts.get('no_status'):
3082 3081 format = "%%s%s" % end
3083 3082
3084 3083 for f in files:
3085 3084 ui.write(format % repo.pathto(f, cwd),
3086 3085 label='status.' + state)
3087 3086 if f in copy:
3088 3087 ui.write(' %s%s' % (repo.pathto(copy[f], cwd), end),
3089 3088 label='status.copied')
3090 3089
3091 3090 def summary(ui, repo, **opts):
3092 3091 """summarize working directory state
3093 3092
3094 3093 This generates a brief summary of the working directory state,
3095 3094 including parents, branch, commit status, and available updates.
3096 3095
3097 3096 With the --remote option, this will check the default paths for
3098 3097 incoming and outgoing changes. This can be time-consuming.
3099 3098 """
3100 3099
3101 3100 ctx = repo[None]
3102 3101 parents = ctx.parents()
3103 3102 pnode = parents[0].node()
3104 3103
3105 3104 for p in parents:
3106 3105 # label with log.changeset (instead of log.parent) since this
3107 3106 # shows a working directory parent *changeset*:
3108 3107 ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
3109 3108 label='log.changeset')
3110 3109 ui.write(' '.join(p.tags()), label='log.tag')
3111 3110 if p.rev() == -1:
3112 3111 if not len(repo):
3113 3112 ui.write(_(' (empty repository)'))
3114 3113 else:
3115 3114 ui.write(_(' (no revision checked out)'))
3116 3115 ui.write('\n')
3117 3116 if p.description():
3118 3117 ui.status(' ' + p.description().splitlines()[0].strip() + '\n',
3119 3118 label='log.summary')
3120 3119
3121 3120 branch = ctx.branch()
3122 3121 bheads = repo.branchheads(branch)
3123 3122 m = _('branch: %s\n') % branch
3124 3123 if branch != 'default':
3125 3124 ui.write(m, label='log.branch')
3126 3125 else:
3127 3126 ui.status(m, label='log.branch')
3128 3127
3129 3128 st = list(repo.status(unknown=True))[:6]
3130 3129
3131 3130 ms = mergemod.mergestate(repo)
3132 3131 st.append([f for f in ms if ms[f] == 'u'])
3133 3132
3134 3133 subs = [s for s in ctx.substate if ctx.sub(s).dirty()]
3135 3134 st.append(subs)
3136 3135
3137 3136 labels = [ui.label(_('%d modified'), 'status.modified'),
3138 3137 ui.label(_('%d added'), 'status.added'),
3139 3138 ui.label(_('%d removed'), 'status.removed'),
3140 3139 ui.label(_('%d deleted'), 'status.deleted'),
3141 3140 ui.label(_('%d unknown'), 'status.unknown'),
3142 3141 ui.label(_('%d ignored'), 'status.ignored'),
3143 3142 ui.label(_('%d unresolved'), 'resolve.unresolved'),
3144 3143 ui.label(_('%d subrepos'), 'status.modified')]
3145 3144 t = []
3146 3145 for s, l in zip(st, labels):
3147 3146 if s:
3148 3147 t.append(l % len(s))
3149 3148
3150 3149 t = ', '.join(t)
3151 3150 cleanworkdir = False
3152 3151
3153 3152 if len(parents) > 1:
3154 3153 t += _(' (merge)')
3155 3154 elif branch != parents[0].branch():
3156 3155 t += _(' (new branch)')
3157 3156 elif (parents[0].extra().get('close') and
3158 3157 pnode in repo.branchheads(branch, closed=True)):
3159 3158 t += _(' (head closed)')
3160 3159 elif (not st[0] and not st[1] and not st[2] and not st[7]):
3161 3160 t += _(' (clean)')
3162 3161 cleanworkdir = True
3163 3162 elif pnode not in bheads:
3164 3163 t += _(' (new branch head)')
3165 3164
3166 3165 if cleanworkdir:
3167 3166 ui.status(_('commit: %s\n') % t.strip())
3168 3167 else:
3169 3168 ui.write(_('commit: %s\n') % t.strip())
3170 3169
3171 3170 # all ancestors of branch heads - all ancestors of parent = new csets
3172 3171 new = [0] * len(repo)
3173 3172 cl = repo.changelog
3174 3173 for a in [cl.rev(n) for n in bheads]:
3175 3174 new[a] = 1
3176 3175 for a in cl.ancestors(*[cl.rev(n) for n in bheads]):
3177 3176 new[a] = 1
3178 3177 for a in [p.rev() for p in parents]:
3179 3178 if a >= 0:
3180 3179 new[a] = 0
3181 3180 for a in cl.ancestors(*[p.rev() for p in parents]):
3182 3181 new[a] = 0
3183 3182 new = sum(new)
3184 3183
3185 3184 if new == 0:
3186 3185 ui.status(_('update: (current)\n'))
3187 3186 elif pnode not in bheads:
3188 3187 ui.write(_('update: %d new changesets (update)\n') % new)
3189 3188 else:
3190 3189 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') %
3191 3190 (new, len(bheads)))
3192 3191
3193 3192 if opts.get('remote'):
3194 3193 t = []
3195 3194 source, branches = hg.parseurl(ui.expandpath('default'))
3196 3195 other = hg.repository(cmdutil.remoteui(repo, {}), source)
3197 3196 revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
3198 3197 ui.debug('comparing with %s\n' % url.hidepassword(source))
3199 3198 repo.ui.pushbuffer()
3200 3199 common, incoming, rheads = repo.findcommonincoming(other)
3201 3200 repo.ui.popbuffer()
3202 3201 if incoming:
3203 3202 t.append(_('1 or more incoming'))
3204 3203
3205 3204 dest, branches = hg.parseurl(ui.expandpath('default-push', 'default'))
3206 3205 revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
3207 3206 other = hg.repository(cmdutil.remoteui(repo, {}), dest)
3208 3207 ui.debug('comparing with %s\n' % url.hidepassword(dest))
3209 3208 repo.ui.pushbuffer()
3210 3209 o = repo.findoutgoing(other)
3211 3210 repo.ui.popbuffer()
3212 3211 o = repo.changelog.nodesbetween(o, None)[0]
3213 3212 if o:
3214 3213 t.append(_('%d outgoing') % len(o))
3215 3214
3216 3215 if t:
3217 3216 ui.write(_('remote: %s\n') % (', '.join(t)))
3218 3217 else:
3219 3218 ui.status(_('remote: (synced)\n'))
3220 3219
3221 3220 def tag(ui, repo, name1, *names, **opts):
3222 3221 """add one or more tags for the current or given revision
3223 3222
3224 3223 Name a particular revision using <name>.
3225 3224
3226 3225 Tags are used to name particular revisions of the repository and are
3227 3226 very useful to compare different revisions, to go back to significant
3228 3227 earlier versions or to mark branch points as releases, etc.
3229 3228
3230 3229 If no revision is given, the parent of the working directory is
3231 3230 used, or tip if no revision is checked out.
3232 3231
3233 3232 To facilitate version control, distribution, and merging of tags,
3234 3233 they are stored as a file named ".hgtags" which is managed
3235 3234 similarly to other project files and can be hand-edited if
3236 3235 necessary. The file '.hg/localtags' is used for local tags (not
3237 3236 shared among repositories).
3238 3237
3239 3238 See :hg:`help dates` for a list of formats valid for -d/--date.
3240 3239
3241 3240 Since tag names have priority over branch names during revision
3242 3241 lookup, using an existing branch name as a tag name is discouraged.
3243 3242 """
3244 3243
3245 3244 rev_ = "."
3246 3245 names = [t.strip() for t in (name1,) + names]
3247 3246 if len(names) != len(set(names)):
3248 3247 raise util.Abort(_('tag names must be unique'))
3249 3248 for n in names:
3250 3249 if n in ['tip', '.', 'null']:
3251 3250 raise util.Abort(_('the name \'%s\' is reserved') % n)
3252 3251 if opts.get('rev') and opts.get('remove'):
3253 3252 raise util.Abort(_("--rev and --remove are incompatible"))
3254 3253 if opts.get('rev'):
3255 3254 rev_ = opts['rev']
3256 3255 message = opts.get('message')
3257 3256 if opts.get('remove'):
3258 3257 expectedtype = opts.get('local') and 'local' or 'global'
3259 3258 for n in names:
3260 3259 if not repo.tagtype(n):
3261 3260 raise util.Abort(_('tag \'%s\' does not exist') % n)
3262 3261 if repo.tagtype(n) != expectedtype:
3263 3262 if expectedtype == 'global':
3264 3263 raise util.Abort(_('tag \'%s\' is not a global tag') % n)
3265 3264 else:
3266 3265 raise util.Abort(_('tag \'%s\' is not a local tag') % n)
3267 3266 rev_ = nullid
3268 3267 if not message:
3269 3268 # we don't translate commit messages
3270 3269 message = 'Removed tag %s' % ', '.join(names)
3271 3270 elif not opts.get('force'):
3272 3271 for n in names:
3273 3272 if n in repo.tags():
3274 3273 raise util.Abort(_('tag \'%s\' already exists '
3275 3274 '(use -f to force)') % n)
3276 3275 if not rev_ and repo.dirstate.parents()[1] != nullid:
3277 3276 raise util.Abort(_('uncommitted merge - please provide a '
3278 3277 'specific revision'))
3279 3278 r = repo[rev_].node()
3280 3279
3281 3280 if not message:
3282 3281 # we don't translate commit messages
3283 3282 message = ('Added tag %s for changeset %s' %
3284 3283 (', '.join(names), short(r)))
3285 3284
3286 3285 date = opts.get('date')
3287 3286 if date:
3288 3287 date = util.parsedate(date)
3289 3288
3290 3289 repo.tag(names, r, message, opts.get('local'), opts.get('user'), date)
3291 3290
3292 3291 def tags(ui, repo):
3293 3292 """list repository tags
3294 3293
3295 3294 This lists both regular and local tags. When the -v/--verbose
3296 3295 switch is used, a third column "local" is printed for local tags.
3297 3296 """
3298 3297
3299 3298 hexfunc = ui.debugflag and hex or short
3300 3299 tagtype = ""
3301 3300
3302 3301 for t, n in reversed(repo.tagslist()):
3303 3302 if ui.quiet:
3304 3303 ui.write("%s\n" % t)
3305 3304 continue
3306 3305
3307 3306 try:
3308 3307 hn = hexfunc(n)
3309 3308 r = "%5d:%s" % (repo.changelog.rev(n), hn)
3310 3309 except error.LookupError:
3311 3310 r = " ?:%s" % hn
3312 3311 else:
3313 3312 spaces = " " * (30 - encoding.colwidth(t))
3314 3313 if ui.verbose:
3315 3314 if repo.tagtype(t) == 'local':
3316 3315 tagtype = " local"
3317 3316 else:
3318 3317 tagtype = ""
3319 3318 ui.write("%s%s %s%s\n" % (t, spaces, r, tagtype))
3320 3319
3321 3320 def tip(ui, repo, **opts):
3322 3321 """show the tip revision
3323 3322
3324 3323 The tip revision (usually just called the tip) is the changeset
3325 3324 most recently added to the repository (and therefore the most
3326 3325 recently changed head).
3327 3326
3328 3327 If you have just made a commit, that commit will be the tip. If
3329 3328 you have just pulled changes from another repository, the tip of
3330 3329 that repository becomes the current tip. The "tip" tag is special
3331 3330 and cannot be renamed or assigned to a different changeset.
3332 3331 """
3333 3332 displayer = cmdutil.show_changeset(ui, repo, opts)
3334 3333 displayer.show(repo[len(repo) - 1])
3335 3334 displayer.close()
3336 3335
3337 3336 def unbundle(ui, repo, fname1, *fnames, **opts):
3338 3337 """apply one or more changegroup files
3339 3338
3340 3339 Apply one or more compressed changegroup files generated by the
3341 3340 bundle command.
3342 3341 """
3343 3342 fnames = (fname1,) + fnames
3344 3343
3345 3344 lock = repo.lock()
3346 3345 try:
3347 3346 for fname in fnames:
3348 3347 f = url.open(ui, fname)
3349 3348 gen = changegroup.readbundle(f, fname)
3350 3349 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
3351 3350 finally:
3352 3351 lock.release()
3353 3352
3354 3353 return postincoming(ui, repo, modheads, opts.get('update'), None)
3355 3354
3356 3355 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False):
3357 3356 """update working directory (or switch revisions)
3358 3357
3359 3358 Update the repository's working directory to the specified
3360 3359 changeset.
3361 3360
3362 3361 If no changeset is specified, attempt to update to the head of the
3363 3362 current branch. If this head is a descendant of the working
3364 3363 directory's parent, update to it, otherwise abort.
3365 3364
3366 3365 The following rules apply when the working directory contains
3367 3366 uncommitted changes:
3368 3367
3369 3368 1. If neither -c/--check nor -C/--clean is specified, and if
3370 3369 the requested changeset is an ancestor or descendant of
3371 3370 the working directory's parent, the uncommitted changes
3372 3371 are merged into the requested changeset and the merged
3373 3372 result is left uncommitted. If the requested changeset is
3374 3373 not an ancestor or descendant (that is, it is on another
3375 3374 branch), the update is aborted and the uncommitted changes
3376 3375 are preserved.
3377 3376
3378 3377 2. With the -c/--check option, the update is aborted and the
3379 3378 uncommitted changes are preserved.
3380 3379
3381 3380 3. With the -C/--clean option, uncommitted changes are discarded and
3382 3381 the working directory is updated to the requested changeset.
3383 3382
3384 3383 Use null as the changeset to remove the working directory (like
3385 3384 :hg:`clone -U`).
3386 3385
3387 3386 If you want to update just one file to an older changeset, use :hg:`revert`.
3388 3387
3389 3388 See :hg:`help dates` for a list of formats valid for -d/--date.
3390 3389 """
3391 3390 if rev and node:
3392 3391 raise util.Abort(_("please specify just one revision"))
3393 3392
3394 3393 if not rev:
3395 3394 rev = node
3396 3395
3397 3396 if check and clean:
3398 3397 raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
3399 3398
3400 3399 if check:
3401 3400 # we could use dirty() but we can ignore merge and branch trivia
3402 3401 c = repo[None]
3403 3402 if c.modified() or c.added() or c.removed():
3404 3403 raise util.Abort(_("uncommitted local changes"))
3405 3404
3406 3405 if date:
3407 3406 if rev:
3408 3407 raise util.Abort(_("you can't specify a revision and a date"))
3409 3408 rev = cmdutil.finddate(ui, repo, date)
3410 3409
3411 3410 if clean or check:
3412 3411 return hg.clean(repo, rev)
3413 3412 else:
3414 3413 return hg.update(repo, rev)
3415 3414
3416 3415 def verify(ui, repo):
3417 3416 """verify the integrity of the repository
3418 3417
3419 3418 Verify the integrity of the current repository.
3420 3419
3421 3420 This will perform an extensive check of the repository's
3422 3421 integrity, validating the hashes and checksums of each entry in
3423 3422 the changelog, manifest, and tracked files, as well as the
3424 3423 integrity of their crosslinks and indices.
3425 3424 """
3426 3425 return hg.verify(repo)
3427 3426
3428 3427 def version_(ui):
3429 3428 """output version and copyright information"""
3430 3429 ui.write(_("Mercurial Distributed SCM (version %s)\n")
3431 3430 % util.version())
3432 3431 ui.status(_(
3433 3432 "\nCopyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others\n"
3434 3433 "This is free software; see the source for copying conditions. "
3435 3434 "There is NO\nwarranty; "
3436 3435 "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
3437 3436 ))
3438 3437
3439 3438 # Command options and aliases are listed here, alphabetically
3440 3439
3441 3440 globalopts = [
3442 3441 ('R', 'repository', '',
3443 3442 _('repository root directory or name of overlay bundle file')),
3444 3443 ('', 'cwd', '', _('change working directory')),
3445 3444 ('y', 'noninteractive', None,
3446 3445 _('do not prompt, assume \'yes\' for any required answers')),
3447 3446 ('q', 'quiet', None, _('suppress output')),
3448 3447 ('v', 'verbose', None, _('enable additional output')),
3449 3448 ('', 'config', [],
3450 3449 _('set/override config option (use \'section.name=value\')')),
3451 3450 ('', 'debug', None, _('enable debugging output')),
3452 3451 ('', 'debugger', None, _('start debugger')),
3453 3452 ('', 'encoding', encoding.encoding, _('set the charset encoding')),
3454 3453 ('', 'encodingmode', encoding.encodingmode,
3455 3454 _('set the charset encoding mode')),
3456 3455 ('', 'traceback', None, _('always print a traceback on exception')),
3457 3456 ('', 'time', None, _('time how long the command takes')),
3458 3457 ('', 'profile', None, _('print command execution profile')),
3459 3458 ('', 'version', None, _('output version information and exit')),
3460 3459 ('h', 'help', None, _('display help and exit')),
3461 3460 ]
3462 3461
3463 3462 dryrunopts = [('n', 'dry-run', None,
3464 3463 _('do not perform actions, just print output'))]
3465 3464
3466 3465 remoteopts = [
3467 3466 ('e', 'ssh', '', _('specify ssh command to use')),
3468 3467 ('', 'remotecmd', '', _('specify hg command to run on the remote side')),
3469 3468 ]
3470 3469
3471 3470 walkopts = [
3472 3471 ('I', 'include', [], _('include names matching the given patterns')),
3473 3472 ('X', 'exclude', [], _('exclude names matching the given patterns')),
3474 3473 ]
3475 3474
3476 3475 commitopts = [
3477 3476 ('m', 'message', '', _('use <text> as commit message')),
3478 3477 ('l', 'logfile', '', _('read commit message from <file>')),
3479 3478 ]
3480 3479
3481 3480 commitopts2 = [
3482 3481 ('d', 'date', '', _('record datecode as commit date')),
3483 3482 ('u', 'user', '', _('record the specified user as committer')),
3484 3483 ]
3485 3484
3486 3485 templateopts = [
3487 3486 ('', 'style', '', _('display using template map file')),
3488 3487 ('', 'template', '', _('display with template')),
3489 3488 ]
3490 3489
3491 3490 logopts = [
3492 3491 ('p', 'patch', None, _('show patch')),
3493 3492 ('g', 'git', None, _('use git extended diff format')),
3494 3493 ('l', 'limit', '', _('limit number of changes displayed')),
3495 3494 ('M', 'no-merges', None, _('do not show merges')),
3496 3495 ('', 'stat', None, _('output diffstat-style summary of changes')),
3497 3496 ] + templateopts
3498 3497
3499 3498 diffopts = [
3500 3499 ('a', 'text', None, _('treat all files as text')),
3501 3500 ('g', 'git', None, _('use git extended diff format')),
3502 3501 ('', 'nodates', None, _('omit dates from diff headers'))
3503 3502 ]
3504 3503
3505 3504 diffopts2 = [
3506 3505 ('p', 'show-function', None, _('show which function each change is in')),
3507 3506 ('', 'reverse', None, _('produce a diff that undoes the changes')),
3508 3507 ('w', 'ignore-all-space', None,
3509 3508 _('ignore white space when comparing lines')),
3510 3509 ('b', 'ignore-space-change', None,
3511 3510 _('ignore changes in the amount of white space')),
3512 3511 ('B', 'ignore-blank-lines', None,
3513 3512 _('ignore changes whose lines are all blank')),
3514 3513 ('U', 'unified', '', _('number of lines of context to show')),
3515 3514 ('', 'stat', None, _('output diffstat-style summary of changes')),
3516 3515 ]
3517 3516
3518 3517 similarityopts = [
3519 3518 ('s', 'similarity', '',
3520 3519 _('guess renamed files by similarity (0<=s<=100)'))
3521 3520 ]
3522 3521
3523 3522 table = {
3524 3523 "^add": (add, walkopts + dryrunopts, _('[OPTION]... [FILE]...')),
3525 3524 "addremove":
3526 3525 (addremove, similarityopts + walkopts + dryrunopts,
3527 3526 _('[OPTION]... [FILE]...')),
3528 3527 "^annotate|blame":
3529 3528 (annotate,
3530 3529 [('r', 'rev', '', _('annotate the specified revision')),
3531 3530 ('', 'follow', None,
3532 3531 _('follow copies/renames and list the filename (DEPRECATED)')),
3533 3532 ('', 'no-follow', None, _("don't follow copies and renames")),
3534 3533 ('a', 'text', None, _('treat all files as text')),
3535 3534 ('u', 'user', None, _('list the author (long with -v)')),
3536 3535 ('f', 'file', None, _('list the filename')),
3537 3536 ('d', 'date', None, _('list the date (short with -q)')),
3538 3537 ('n', 'number', None, _('list the revision number (default)')),
3539 3538 ('c', 'changeset', None, _('list the changeset')),
3540 3539 ('l', 'line-number', None,
3541 3540 _('show line number at the first appearance'))
3542 3541 ] + walkopts,
3543 3542 _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...')),
3544 3543 "archive":
3545 3544 (archive,
3546 3545 [('', 'no-decode', None, _('do not pass files through decoders')),
3547 3546 ('p', 'prefix', '', _('directory prefix for files in archive')),
3548 3547 ('r', 'rev', '', _('revision to distribute')),
3549 3548 ('t', 'type', '', _('type of distribution to create')),
3550 3549 ] + walkopts,
3551 3550 _('[OPTION]... DEST')),
3552 3551 "backout":
3553 3552 (backout,
3554 3553 [('', 'merge', None,
3555 3554 _('merge with old dirstate parent after backout')),
3556 3555 ('', 'parent', '', _('parent to choose when backing out merge')),
3557 3556 ('r', 'rev', '', _('revision to backout')),
3558 3557 ] + walkopts + commitopts + commitopts2,
3559 3558 _('[OPTION]... [-r] REV')),
3560 3559 "bisect":
3561 3560 (bisect,
3562 3561 [('r', 'reset', False, _('reset bisect state')),
3563 3562 ('g', 'good', False, _('mark changeset good')),
3564 3563 ('b', 'bad', False, _('mark changeset bad')),
3565 3564 ('s', 'skip', False, _('skip testing changeset')),
3566 3565 ('c', 'command', '', _('use command to check changeset state')),
3567 3566 ('U', 'noupdate', False, _('do not update to target'))],
3568 3567 _("[-gbsr] [-U] [-c CMD] [REV]")),
3569 3568 "branch":
3570 3569 (branch,
3571 3570 [('f', 'force', None,
3572 3571 _('set branch name even if it shadows an existing branch')),
3573 3572 ('C', 'clean', None, _('reset branch name to parent branch name'))],
3574 3573 _('[-fC] [NAME]')),
3575 3574 "branches":
3576 3575 (branches,
3577 3576 [('a', 'active', False,
3578 3577 _('show only branches that have unmerged heads')),
3579 3578 ('c', 'closed', False,
3580 3579 _('show normal and closed branches'))],
3581 3580 _('[-ac]')),
3582 3581 "bundle":
3583 3582 (bundle,
3584 3583 [('f', 'force', None,
3585 3584 _('run even when the destination is unrelated')),
3586 3585 ('r', 'rev', [],
3587 3586 _('a changeset intended to be added to the destination')),
3588 3587 ('b', 'branch', [],
3589 3588 _('a specific branch you would like to bundle')),
3590 3589 ('', 'base', [],
3591 3590 _('a base changeset assumed to be available at the destination')),
3592 3591 ('a', 'all', None, _('bundle all changesets in the repository')),
3593 3592 ('t', 'type', 'bzip2', _('bundle compression type to use')),
3594 3593 ] + remoteopts,
3595 3594 _('[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]')),
3596 3595 "cat":
3597 3596 (cat,
3598 3597 [('o', 'output', '', _('print output to file with formatted name')),
3599 3598 ('r', 'rev', '', _('print the given revision')),
3600 3599 ('', 'decode', None, _('apply any matching decode filter')),
3601 3600 ] + walkopts,
3602 3601 _('[OPTION]... FILE...')),
3603 3602 "^clone":
3604 3603 (clone,
3605 3604 [('U', 'noupdate', None,
3606 3605 _('the clone will include an empty working copy (only a repository)')),
3607 3606 ('u', 'updaterev', '',
3608 3607 _('revision, tag or branch to check out')),
3609 3608 ('r', 'rev', [],
3610 3609 _('include the specified changeset')),
3611 3610 ('b', 'branch', [],
3612 3611 _('clone only the specified branch')),
3613 3612 ('', 'pull', None, _('use pull protocol to copy metadata')),
3614 3613 ('', 'uncompressed', None,
3615 3614 _('use uncompressed transfer (fast over LAN)')),
3616 3615 ] + remoteopts,
3617 3616 _('[OPTION]... SOURCE [DEST]')),
3618 3617 "^commit|ci":
3619 3618 (commit,
3620 3619 [('A', 'addremove', None,
3621 3620 _('mark new/missing files as added/removed before committing')),
3622 3621 ('', 'close-branch', None,
3623 3622 _('mark a branch as closed, hiding it from the branch list')),
3624 3623 ] + walkopts + commitopts + commitopts2,
3625 3624 _('[OPTION]... [FILE]...')),
3626 3625 "copy|cp":
3627 3626 (copy,
3628 3627 [('A', 'after', None, _('record a copy that has already occurred')),
3629 3628 ('f', 'force', None,
3630 3629 _('forcibly copy over an existing managed file')),
3631 3630 ] + walkopts + dryrunopts,
3632 3631 _('[OPTION]... [SOURCE]... DEST')),
3633 3632 "debugancestor": (debugancestor, [], _('[INDEX] REV1 REV2')),
3634 3633 "debugcheckstate": (debugcheckstate, [], ''),
3635 3634 "debugcommands": (debugcommands, [], _('[COMMAND]')),
3636 3635 "debugcomplete":
3637 3636 (debugcomplete,
3638 3637 [('o', 'options', None, _('show the command options'))],
3639 3638 _('[-o] CMD')),
3640 3639 "debugdate":
3641 3640 (debugdate,
3642 3641 [('e', 'extended', None, _('try extended date formats'))],
3643 3642 _('[-e] DATE [RANGE]')),
3644 3643 "debugdata": (debugdata, [], _('FILE REV')),
3645 3644 "debugfsinfo": (debugfsinfo, [], _('[PATH]')),
3646 3645 "debugindex": (debugindex, [], _('FILE')),
3647 3646 "debugindexdot": (debugindexdot, [], _('FILE')),
3648 3647 "debuginstall": (debuginstall, [], ''),
3649 3648 "debugrebuildstate":
3650 3649 (debugrebuildstate,
3651 3650 [('r', 'rev', '', _('revision to rebuild to'))],
3652 3651 _('[-r REV] [REV]')),
3653 3652 "debugrename":
3654 3653 (debugrename,
3655 3654 [('r', 'rev', '', _('revision to debug'))],
3656 3655 _('[-r REV] FILE')),
3657 3656 "debugsetparents":
3658 3657 (debugsetparents, [], _('REV1 [REV2]')),
3659 3658 "debugstate":
3660 3659 (debugstate,
3661 3660 [('', 'nodates', None, _('do not display the saved mtime'))],
3662 3661 _('[OPTION]...')),
3663 3662 "debugsub":
3664 3663 (debugsub,
3665 3664 [('r', 'rev', '', _('revision to check'))],
3666 3665 _('[-r REV] [REV]')),
3667 3666 "debugwalk": (debugwalk, walkopts, _('[OPTION]... [FILE]...')),
3668 3667 "^diff":
3669 3668 (diff,
3670 3669 [('r', 'rev', [], _('revision')),
3671 3670 ('c', 'change', '', _('change made by revision'))
3672 3671 ] + diffopts + diffopts2 + walkopts,
3673 3672 _('[OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...')),
3674 3673 "^export":
3675 3674 (export,
3676 3675 [('o', 'output', '', _('print output to file with formatted name')),
3677 3676 ('', 'switch-parent', None, _('diff against the second parent')),
3678 3677 ('r', 'rev', [], _('revisions to export')),
3679 3678 ] + diffopts,
3680 3679 _('[OPTION]... [-o OUTFILESPEC] REV...')),
3681 3680 "^forget":
3682 3681 (forget,
3683 3682 [] + walkopts,
3684 3683 _('[OPTION]... FILE...')),
3685 3684 "grep":
3686 3685 (grep,
3687 3686 [('0', 'print0', None, _('end fields with NUL')),
3688 3687 ('', 'all', None, _('print all revisions that match')),
3689 3688 ('f', 'follow', None,
3690 3689 _('follow changeset history,'
3691 3690 ' or file history across copies and renames')),
3692 3691 ('i', 'ignore-case', None, _('ignore case when matching')),
3693 3692 ('l', 'files-with-matches', None,
3694 3693 _('print only filenames and revisions that match')),
3695 3694 ('n', 'line-number', None, _('print matching line numbers')),
3696 3695 ('r', 'rev', [], _('only search files changed within revision range')),
3697 3696 ('u', 'user', None, _('list the author (long with -v)')),
3698 3697 ('d', 'date', None, _('list the date (short with -q)')),
3699 3698 ] + walkopts,
3700 3699 _('[OPTION]... PATTERN [FILE]...')),
3701 3700 "heads":
3702 3701 (heads,
3703 3702 [('r', 'rev', '', _('show only heads which are descendants of REV')),
3704 3703 ('t', 'topo', False, _('show topological heads only')),
3705 3704 ('a', 'active', False,
3706 3705 _('show active branchheads only [DEPRECATED]')),
3707 3706 ('c', 'closed', False,
3708 3707 _('show normal and closed branch heads')),
3709 3708 ] + templateopts,
3710 3709 _('[-ac] [-r STARTREV] [REV]...')),
3711 3710 "help": (help_, [], _('[TOPIC]')),
3712 3711 "identify|id":
3713 3712 (identify,
3714 3713 [('r', 'rev', '', _('identify the specified revision')),
3715 3714 ('n', 'num', None, _('show local revision number')),
3716 3715 ('i', 'id', None, _('show global revision id')),
3717 3716 ('b', 'branch', None, _('show branch')),
3718 3717 ('t', 'tags', None, _('show tags'))],
3719 3718 _('[-nibt] [-r REV] [SOURCE]')),
3720 3719 "import|patch":
3721 3720 (import_,
3722 3721 [('p', 'strip', 1,
3723 3722 _('directory strip option for patch. This has the same '
3724 3723 'meaning as the corresponding patch option')),
3725 3724 ('b', 'base', '', _('base path')),
3726 3725 ('f', 'force', None,
3727 3726 _('skip check for outstanding uncommitted changes')),
3728 3727 ('', 'no-commit', None,
3729 3728 _("don't commit, just update the working directory")),
3730 3729 ('', 'exact', None,
3731 3730 _('apply patch to the nodes from which it was generated')),
3732 3731 ('', 'import-branch', None,
3733 3732 _('use any branch information in patch (implied by --exact)'))] +
3734 3733 commitopts + commitopts2 + similarityopts,
3735 3734 _('[OPTION]... PATCH...')),
3736 3735 "incoming|in":
3737 3736 (incoming,
3738 3737 [('f', 'force', None,
3739 3738 _('run even if remote repository is unrelated')),
3740 3739 ('n', 'newest-first', None, _('show newest record first')),
3741 3740 ('', 'bundle', '', _('file to store the bundles into')),
3742 3741 ('r', 'rev', [],
3743 3742 _('a remote changeset intended to be added')),
3744 3743 ('b', 'branch', [],
3745 3744 _('a specific branch you would like to pull')),
3746 3745 ] + logopts + remoteopts,
3747 3746 _('[-p] [-n] [-M] [-f] [-r REV]...'
3748 3747 ' [--bundle FILENAME] [SOURCE]')),
3749 3748 "^init":
3750 3749 (init,
3751 3750 remoteopts,
3752 3751 _('[-e CMD] [--remotecmd CMD] [DEST]')),
3753 3752 "locate":
3754 3753 (locate,
3755 3754 [('r', 'rev', '', _('search the repository as it is in REV')),
3756 3755 ('0', 'print0', None,
3757 3756 _('end filenames with NUL, for use with xargs')),
3758 3757 ('f', 'fullpath', None,
3759 3758 _('print complete paths from the filesystem root')),
3760 3759 ] + walkopts,
3761 3760 _('[OPTION]... [PATTERN]...')),
3762 3761 "^log|history":
3763 3762 (log,
3764 3763 [('f', 'follow', None,
3765 3764 _('follow changeset history,'
3766 3765 ' or file history across copies and renames')),
3767 3766 ('', 'follow-first', None,
3768 3767 _('only follow the first parent of merge changesets')),
3769 3768 ('d', 'date', '', _('show revisions matching date spec')),
3770 3769 ('C', 'copies', None, _('show copied files')),
3771 3770 ('k', 'keyword', [], _('do case-insensitive search for a keyword')),
3772 3771 ('r', 'rev', [], _('show the specified revision or range')),
3773 3772 ('', 'removed', None, _('include revisions where files were removed')),
3774 3773 ('m', 'only-merges', None, _('show only merges')),
3775 3774 ('u', 'user', [], _('revisions committed by user')),
3776 3775 ('', 'only-branch', [],
3777 3776 _('show only changesets within the given named branch (DEPRECATED)')),
3778 3777 ('b', 'branch', [],
3779 3778 _('show changesets within the given named branch')),
3780 3779 ('P', 'prune', [],
3781 3780 _('do not display revision or any of its ancestors')),
3782 3781 ] + logopts + walkopts,
3783 3782 _('[OPTION]... [FILE]')),
3784 3783 "manifest":
3785 3784 (manifest,
3786 3785 [('r', 'rev', '', _('revision to display'))],
3787 3786 _('[-r REV]')),
3788 3787 "^merge":
3789 3788 (merge,
3790 3789 [('f', 'force', None, _('force a merge with outstanding changes')),
3791 3790 ('r', 'rev', '', _('revision to merge')),
3792 3791 ('P', 'preview', None,
3793 3792 _('review revisions to merge (no merge is performed)'))],
3794 3793 _('[-P] [-f] [[-r] REV]')),
3795 3794 "outgoing|out":
3796 3795 (outgoing,
3797 3796 [('f', 'force', None,
3798 3797 _('run even when the destination is unrelated')),
3799 3798 ('r', 'rev', [],
3800 3799 _('a changeset intended to be included in the destination')),
3801 3800 ('n', 'newest-first', None, _('show newest record first')),
3802 3801 ('b', 'branch', [],
3803 3802 _('a specific branch you would like to push')),
3804 3803 ] + logopts + remoteopts,
3805 3804 _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')),
3806 3805 "parents":
3807 3806 (parents,
3808 3807 [('r', 'rev', '', _('show parents of the specified revision')),
3809 3808 ] + templateopts,
3810 3809 _('[-r REV] [FILE]')),
3811 3810 "paths": (paths, [], _('[NAME]')),
3812 3811 "^pull":
3813 3812 (pull,
3814 3813 [('u', 'update', None,
3815 3814 _('update to new branch head if changesets were pulled')),
3816 3815 ('f', 'force', None,
3817 3816 _('run even when remote repository is unrelated')),
3818 3817 ('r', 'rev', [],
3819 3818 _('a remote changeset intended to be added')),
3820 3819 ('b', 'branch', [],
3821 3820 _('a specific branch you would like to pull')),
3822 3821 ] + remoteopts,
3823 3822 _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')),
3824 3823 "^push":
3825 3824 (push,
3826 3825 [('f', 'force', None, _('force push')),
3827 3826 ('r', 'rev', [],
3828 3827 _('a changeset intended to be included in the destination')),
3829 3828 ('b', 'branch', [],
3830 3829 _('a specific branch you would like to push')),
3831 3830 ] + remoteopts,
3832 3831 _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')),
3833 3832 "recover": (recover, []),
3834 3833 "^remove|rm":
3835 3834 (remove,
3836 3835 [('A', 'after', None, _('record delete for missing files')),
3837 3836 ('f', 'force', None,
3838 3837 _('remove (and delete) file even if added or modified')),
3839 3838 ] + walkopts,
3840 3839 _('[OPTION]... FILE...')),
3841 3840 "rename|mv":
3842 3841 (rename,
3843 3842 [('A', 'after', None, _('record a rename that has already occurred')),
3844 3843 ('f', 'force', None,
3845 3844 _('forcibly copy over an existing managed file')),
3846 3845 ] + walkopts + dryrunopts,
3847 3846 _('[OPTION]... SOURCE... DEST')),
3848 3847 "resolve":
3849 3848 (resolve,
3850 3849 [('a', 'all', None, _('select all unresolved files')),
3851 3850 ('l', 'list', None, _('list state of files needing merge')),
3852 3851 ('m', 'mark', None, _('mark files as resolved')),
3853 3852 ('u', 'unmark', None, _('unmark files as resolved')),
3854 3853 ('n', 'no-status', None, _('hide status prefix'))]
3855 3854 + walkopts,
3856 3855 _('[OPTION]... [FILE]...')),
3857 3856 "revert":
3858 3857 (revert,
3859 3858 [('a', 'all', None, _('revert all changes when no arguments given')),
3860 3859 ('d', 'date', '', _('tipmost revision matching date')),
3861 3860 ('r', 'rev', '', _('revert to the specified revision')),
3862 3861 ('', 'no-backup', None, _('do not save backup copies of files')),
3863 3862 ] + walkopts + dryrunopts,
3864 3863 _('[OPTION]... [-r REV] [NAME]...')),
3865 3864 "rollback": (rollback, dryrunopts),
3866 3865 "root": (root, []),
3867 3866 "^serve":
3868 3867 (serve,
3869 3868 [('A', 'accesslog', '', _('name of access log file to write to')),
3870 3869 ('d', 'daemon', None, _('run server in background')),
3871 3870 ('', 'daemon-pipefds', '', _('used internally by daemon mode')),
3872 3871 ('E', 'errorlog', '', _('name of error log file to write to')),
3873 3872 # use string type, then we can check if something was passed
3874 3873 ('p', 'port', '', _('port to listen on (default: 8000)')),
3875 3874 ('a', 'address', '',
3876 3875 _('address to listen on (default: all interfaces)')),
3877 3876 ('', 'prefix', '',
3878 3877 _('prefix path to serve from (default: server root)')),
3879 3878 ('n', 'name', '',
3880 3879 _('name to show in web pages (default: working directory)')),
3881 3880 ('', 'web-conf', '', _('name of the hgweb config file'
3882 3881 ' (serve more than one repository)')),
3883 3882 ('', 'webdir-conf', '', _('name of the hgweb config file'
3884 3883 ' (DEPRECATED)')),
3885 3884 ('', 'pid-file', '', _('name of file to write process ID to')),
3886 3885 ('', 'stdio', None, _('for remote clients')),
3887 3886 ('t', 'templates', '', _('web templates to use')),
3888 3887 ('', 'style', '', _('template style to use')),
3889 3888 ('6', 'ipv6', None, _('use IPv6 in addition to IPv4')),
3890 3889 ('', 'certificate', '', _('SSL certificate file'))],
3891 3890 _('[OPTION]...')),
3892 3891 "showconfig|debugconfig":
3893 3892 (showconfig,
3894 3893 [('u', 'untrusted', None, _('show untrusted configuration options'))],
3895 3894 _('[-u] [NAME]...')),
3896 3895 "^summary|sum":
3897 3896 (summary,
3898 3897 [('', 'remote', None, _('check for push and pull'))], '[--remote]'),
3899 3898 "^status|st":
3900 3899 (status,
3901 3900 [('A', 'all', None, _('show status of all files')),
3902 3901 ('m', 'modified', None, _('show only modified files')),
3903 3902 ('a', 'added', None, _('show only added files')),
3904 3903 ('r', 'removed', None, _('show only removed files')),
3905 3904 ('d', 'deleted', None, _('show only deleted (but tracked) files')),
3906 3905 ('c', 'clean', None, _('show only files without changes')),
3907 3906 ('u', 'unknown', None, _('show only unknown (not tracked) files')),
3908 3907 ('i', 'ignored', None, _('show only ignored files')),
3909 3908 ('n', 'no-status', None, _('hide status prefix')),
3910 3909 ('C', 'copies', None, _('show source of copied files')),
3911 3910 ('0', 'print0', None,
3912 3911 _('end filenames with NUL, for use with xargs')),
3913 3912 ('', 'rev', [], _('show difference from revision')),
3914 3913 ('', 'change', '', _('list the changed files of a revision')),
3915 3914 ] + walkopts,
3916 3915 _('[OPTION]... [FILE]...')),
3917 3916 "tag":
3918 3917 (tag,
3919 3918 [('f', 'force', None, _('replace existing tag')),
3920 3919 ('l', 'local', None, _('make the tag local')),
3921 3920 ('r', 'rev', '', _('revision to tag')),
3922 3921 ('', 'remove', None, _('remove a tag')),
3923 3922 # -l/--local is already there, commitopts cannot be used
3924 3923 ('m', 'message', '', _('use <text> as commit message')),
3925 3924 ] + commitopts2,
3926 3925 _('[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')),
3927 3926 "tags": (tags, [], ''),
3928 3927 "tip":
3929 3928 (tip,
3930 3929 [('p', 'patch', None, _('show patch')),
3931 3930 ('g', 'git', None, _('use git extended diff format')),
3932 3931 ] + templateopts,
3933 3932 _('[-p] [-g]')),
3934 3933 "unbundle":
3935 3934 (unbundle,
3936 3935 [('u', 'update', None,
3937 3936 _('update to new branch head if changesets were unbundled'))],
3938 3937 _('[-u] FILE...')),
3939 3938 "^update|up|checkout|co":
3940 3939 (update,
3941 3940 [('C', 'clean', None, _('discard uncommitted changes (no backup)')),
3942 3941 ('c', 'check', None, _('check for uncommitted changes')),
3943 3942 ('d', 'date', '', _('tipmost revision matching date')),
3944 3943 ('r', 'rev', '', _('revision'))],
3945 3944 _('[-c] [-C] [-d DATE] [[-r] REV]')),
3946 3945 "verify": (verify, []),
3947 3946 "version": (version_, []),
3948 3947 }
3949 3948
3950 3949 norepo = ("clone init version help debugcommands debugcomplete debugdata"
3951 3950 " debugindex debugindexdot debugdate debuginstall debugfsinfo")
3952 3951 optionalrepo = ("identify paths serve showconfig debugancestor")
@@ -1,182 +1,181 b''
1 1 0: Adding root node ()
2 2 -------
3 3 0: Adding root node ()
4 4 =======
5 5 marked working directory as branch a
6 6 1: Adding a branch (a)
7 7 0: Adding root node ()
8 8 -------
9 9 1: Adding a branch (a)
10 10 =======
11 11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
12 12 marked working directory as branch b
13 created new head
14 13 2: Adding b branch (b)
15 14 1: Adding a branch (a)
16 15 0: Adding root node ()
17 16 -------
18 17 2: Adding b branch (b)
19 18 =======
20 19 3: Adding b branch head 1 (b)
21 20 1: Adding a branch (a)
22 21 0: Adding root node ()
23 22 -------
24 23 3: Adding b branch head 1 (b)
25 24 =======
26 25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27 26 created new head
28 27 4: Adding b branch head 2 (b)
29 28 3: Adding b branch head 1 (b)
30 29 1: Adding a branch (a)
31 30 0: Adding root node ()
32 31 -------
33 32 4: Adding b branch head 2 (b)
34 33 3: Adding b branch head 1 (b)
35 34 =======
36 35 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
37 36 created new head
38 37 5: Adding b branch head 3 (b)
39 38 4: Adding b branch head 2 (b)
40 39 3: Adding b branch head 1 (b)
41 40 1: Adding a branch (a)
42 41 0: Adding root node ()
43 42 -------
44 43 5: Adding b branch head 3 (b)
45 44 4: Adding b branch head 2 (b)
46 45 3: Adding b branch head 1 (b)
47 46 =======
48 47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 48 (branch merge, don't forget to commit)
50 49 6: Merging b branch head 2 and b branch head 3 (b)
51 50 3: Adding b branch head 1 (b)
52 51 1: Adding a branch (a)
53 52 0: Adding root node ()
54 53 -------
55 54 6: Merging b branch head 2 and b branch head 3 (b)
56 55 3: Adding b branch head 1 (b)
57 56 =======
58 57 marked working directory as branch c
59 58 7: Adding c branch (c)
60 59 6: Merging b branch head 2 and b branch head 3 (b)
61 60 3: Adding b branch head 1 (b)
62 61 1: Adding a branch (a)
63 62 0: Adding root node ()
64 63 -------
65 64 7: Adding c branch (c)
66 65 =======
67 66 no open branch heads found on branches c (started at 3)
68 67 1
69 68 -------
70 69 7: Adding c branch (c)
71 70 0
72 71 -------
73 72 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
74 73 0
75 74 -------
76 75 3: Adding b branch head 1 (b)
77 76 0
78 77 -------
79 78 6: Merging b branch head 2 and b branch head 3 (b)
80 79 3: Adding b branch head 1 (b)
81 80 0
82 81 -------
83 82 no open branch heads found on branches b (started at 7)
84 83 1
85 84 =======
86 85 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
87 86 7: Adding c branch (c)
88 87 6: Merging b branch head 2 and b branch head 3 (b)
89 88 3: Adding b branch head 1 (b)
90 89 1: Adding a branch (a)
91 90 0: Adding root node ()
92 91 -------
93 92 0: Adding root node ()
94 93 -------
95 94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 95 7: Adding c branch (c)
97 96 6: Merging b branch head 2 and b branch head 3 (b)
98 97 3: Adding b branch head 1 (b)
99 98 1: Adding a branch (a)
100 99 0: Adding root node ()
101 100 -------
102 101 1: Adding a branch (a)
103 102 -------
104 103 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
105 104 7: Adding c branch (c)
106 105 6: Merging b branch head 2 and b branch head 3 (b)
107 106 3: Adding b branch head 1 (b)
108 107 1: Adding a branch (a)
109 108 0: Adding root node ()
110 109 -------
111 110 6: Merging b branch head 2 and b branch head 3 (b)
112 111 3: Adding b branch head 1 (b)
113 112 -------
114 113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
115 114 7: Adding c branch (c)
116 115 6: Merging b branch head 2 and b branch head 3 (b)
117 116 3: Adding b branch head 1 (b)
118 117 1: Adding a branch (a)
119 118 0: Adding root node ()
120 119 -------
121 120 6: Merging b branch head 2 and b branch head 3 (b)
122 121 3: Adding b branch head 1 (b)
123 122 -------
124 123 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
125 124 7: Adding c branch (c)
126 125 6: Merging b branch head 2 and b branch head 3 (b)
127 126 3: Adding b branch head 1 (b)
128 127 1: Adding a branch (a)
129 128 0: Adding root node ()
130 129 -------
131 130 6: Merging b branch head 2 and b branch head 3 (b)
132 131 3: Adding b branch head 1 (b)
133 132 -------
134 133 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
135 134 7: Adding c branch (c)
136 135 6: Merging b branch head 2 and b branch head 3 (b)
137 136 3: Adding b branch head 1 (b)
138 137 1: Adding a branch (a)
139 138 0: Adding root node ()
140 139 -------
141 140 6: Merging b branch head 2 and b branch head 3 (b)
142 141 3: Adding b branch head 1 (b)
143 142 -------
144 143 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
145 144 7: Adding c branch (c)
146 145 6: Merging b branch head 2 and b branch head 3 (b)
147 146 3: Adding b branch head 1 (b)
148 147 1: Adding a branch (a)
149 148 0: Adding root node ()
150 149 -------
151 150 6: Merging b branch head 2 and b branch head 3 (b)
152 151 3: Adding b branch head 1 (b)
153 152 -------
154 153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
155 154 7: Adding c branch (c)
156 155 6: Merging b branch head 2 and b branch head 3 (b)
157 156 3: Adding b branch head 1 (b)
158 157 1: Adding a branch (a)
159 158 0: Adding root node ()
160 159 -------
161 160 7: Adding c branch (c)
162 161 -------
163 162 =======
164 163 1: Adding a branch (a)
165 164 -------
166 165 6: Merging b branch head 2 and b branch head 3 (b)
167 166 3: Adding b branch head 1 (b)
168 167 -------
169 168 7: Adding c branch (c)
170 169 -------
171 170 abort: unknown revision 'z'!
172 171 -------
173 172 =======
174 173 7: Adding c branch (c)
175 174 6: Merging b branch head 2 and b branch head 3 (b)
176 175 3: Adding b branch head 1 (b)
177 176 1: Adding a branch (a)
178 177 0: Adding root node ()
179 178 % topological heads
180 179 7: Adding c branch (c)
181 180 3: Adding b branch head 1 (b)
182 181 1: Adding a branch (a)
@@ -1,47 +1,46 b''
1 1 marked working directory as branch a
2 2 adding foo
3 3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 4 marked working directory as branch c
5 created new head
6 5 requesting all changes
7 6 adding changesets
8 7 adding manifests
9 8 adding file changes
10 9 added 1 changesets with 1 changes to 1 files
11 10 updating to branch a
12 11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 12 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 13 marked working directory as branch b
15 14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 15 marked working directory as branch b
17 16 created new head
18 17 in rev c branch a
19 18 1:dd6e60a716c6
20 19 2:f25d57ab0566
21 20 1:dd6e60a716c6
22 21 2:f25d57ab0566
23 22 out branch .
24 23 2:65511d0e2b55
25 24 2:65511d0e2b55
26 25 clone branch b
27 26 requesting all changes
28 27 adding changesets
29 28 adding manifests
30 29 adding file changes
31 30 added 3 changesets with 3 changes to 1 files (+1 heads)
32 31 updating to branch b
33 32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 33 2:65511d0e2b55
35 34 1:b84708d77ab7
36 35 2:65511d0e2b55
37 36 clone rev a branch b
38 37 requesting all changes
39 38 adding changesets
40 39 adding manifests
41 40 adding file changes
42 41 added 3 changesets with 3 changes to 1 files (+1 heads)
43 42 updating to branch a
44 43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 44 2:65511d0e2b55
46 45 1:b84708d77ab7
47 46 0:5b65ba7c951d
@@ -1,245 +1,244 b''
1 1 marked working directory as branch a
2 2 marked working directory as branch q
3 3 reset working directory to branch a
4 4 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5 5 marked working directory as branch b
6 created new head
7 6 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
8 7 marked working directory as branch c
9 8 abort: the name 'tip' is reserved
10 9 abort: the name 'null' is reserved
11 10 abort: the name '.' is reserved
12 11 marked working directory as branch a branch name much longer than the default justification used by branches
13 12 a branch name much longer than the default justification used by branches 7:10ff5895aa57
14 13 b 4:aee39cd168d0
15 14 c 6:589736a22561 (inactive)
16 15 a 5:d8cbc61dbaa6 (inactive)
17 16 default 0:19709c5a4e75 (inactive)
18 17 -------
19 18 a branch name much longer than the default justification used by branches 7:10ff5895aa57
20 19 b 4:aee39cd168d0
21 20 --- Branch a
22 21 changeset: 5:d8cbc61dbaa6
23 22 branch: a
24 23 parent: 2:881fe2b92ad0
25 24 user: test
26 25 date: Thu Jan 01 00:00:04 1970 +0000
27 26 summary: Adding b branch head 2
28 27
29 28 changeset: 2:881fe2b92ad0
30 29 branch: a
31 30 user: test
32 31 date: Thu Jan 01 00:00:02 1970 +0000
33 32 summary: Adding to a branch
34 33
35 34 changeset: 1:dd6b440dd85a
36 35 branch: a
37 36 user: test
38 37 date: Thu Jan 01 00:00:01 1970 +0000
39 38 summary: Adding a branch
40 39
41 40 ---- Branch b
42 41 changeset: 4:aee39cd168d0
43 42 branch: b
44 43 user: test
45 44 date: Thu Jan 01 00:00:03 1970 +0000
46 45 summary: Adding b branch head 1
47 46
48 47 changeset: 3:ac22033332d1
49 48 branch: b
50 49 parent: 0:19709c5a4e75
51 50 user: test
52 51 date: Thu Jan 01 00:00:02 1970 +0000
53 52 summary: Adding b branch
54 53
55 54 ---- going to test branch closing
56 55 a branch name much longer than the default justification used by branches 7:10ff5895aa57
57 56 b 4:aee39cd168d0
58 57 c 6:589736a22561 (inactive)
59 58 a 5:d8cbc61dbaa6 (inactive)
60 59 default 0:19709c5a4e75 (inactive)
61 60 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
62 61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 62 created new head
64 63 b 10:bfbe841b666e
65 64 a branch name much longer than the default justification used by branches 7:10ff5895aa57
66 65 c 6:589736a22561 (inactive)
67 66 a 5:d8cbc61dbaa6 (inactive)
68 67 default 0:19709c5a4e75 (inactive)
69 68 changeset: 10:bfbe841b666e
70 69 branch: b
71 70 tag: tip
72 71 user: test
73 72 date: Thu Jan 01 00:00:09 1970 +0000
74 73 summary: adding another cset to branch b
75 74
76 75 changeset: 8:eebb944467c9
77 76 branch: b
78 77 parent: 4:aee39cd168d0
79 78 user: test
80 79 date: Thu Jan 01 00:00:07 1970 +0000
81 80 summary: adding cset to branch b
82 81
83 82 changeset: 7:10ff5895aa57
84 83 branch: a branch name much longer than the default justification used by branches
85 84 user: test
86 85 date: Thu Jan 01 00:00:06 1970 +0000
87 86 summary: Adding d branch
88 87
89 88 changeset: 6:589736a22561
90 89 branch: c
91 90 user: test
92 91 date: Thu Jan 01 00:00:05 1970 +0000
93 92 summary: Adding c branch
94 93
95 94 changeset: 5:d8cbc61dbaa6
96 95 branch: a
97 96 parent: 2:881fe2b92ad0
98 97 user: test
99 98 date: Thu Jan 01 00:00:04 1970 +0000
100 99 summary: Adding b branch head 2
101 100
102 101 changeset: 0:19709c5a4e75
103 102 user: test
104 103 date: Thu Jan 01 00:00:00 1970 +0000
105 104 summary: Adding root node
106 105
107 106 changeset: 10:bfbe841b666e
108 107 branch: b
109 108 tag: tip
110 109 user: test
111 110 date: Thu Jan 01 00:00:09 1970 +0000
112 111 summary: adding another cset to branch b
113 112
114 113 changeset: 8:eebb944467c9
115 114 branch: b
116 115 parent: 4:aee39cd168d0
117 116 user: test
118 117 date: Thu Jan 01 00:00:07 1970 +0000
119 118 summary: adding cset to branch b
120 119
121 120 changeset: 7:10ff5895aa57
122 121 branch: a branch name much longer than the default justification used by branches
123 122 user: test
124 123 date: Thu Jan 01 00:00:06 1970 +0000
125 124 summary: Adding d branch
126 125
127 126 changeset: 6:589736a22561
128 127 branch: c
129 128 user: test
130 129 date: Thu Jan 01 00:00:05 1970 +0000
131 130 summary: Adding c branch
132 131
133 132 changeset: 5:d8cbc61dbaa6
134 133 branch: a
135 134 parent: 2:881fe2b92ad0
136 135 user: test
137 136 date: Thu Jan 01 00:00:04 1970 +0000
138 137 summary: Adding b branch head 2
139 138
140 139 changeset: 0:19709c5a4e75
141 140 user: test
142 141 date: Thu Jan 01 00:00:00 1970 +0000
143 142 summary: Adding root node
144 143
145 144 b 8:eebb944467c9
146 145 a branch name much longer than the default justification used by branches 7:10ff5895aa57
147 146 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 147 --- b branch should be inactive
149 148 a branch name much longer than the default justification used by branches 7:10ff5895aa57
150 149 c 6:589736a22561 (inactive)
151 150 a 5:d8cbc61dbaa6 (inactive)
152 151 default 0:19709c5a4e75 (inactive)
153 152 a branch name much longer than the default justification used by branches 7:10ff5895aa57
154 153 b 12:2da6583810df (closed)
155 154 c 6:589736a22561 (inactive)
156 155 a 5:d8cbc61dbaa6 (inactive)
157 156 default 0:19709c5a4e75 (inactive)
158 157 a branch name much longer than the default justification used by branches 7:10ff5895aa57
159 158 no open branch heads found on branches b
160 159 changeset: 12:2da6583810df
161 160 branch: b
162 161 tag: tip
163 162 parent: 8:eebb944467c9
164 163 user: test
165 164 date: Thu Jan 01 00:00:09 1970 +0000
166 165 summary: close this part branch too
167 166
168 167 changeset: 11:c84627f3c15d
169 168 branch: b
170 169 user: test
171 170 date: Thu Jan 01 00:00:09 1970 +0000
172 171 summary: prune bad branch
173 172
174 173 reopening closed branch head 12
175 174 --- branch b is back in action
176 175 b 13:6ac12926b8c3
177 176 a branch name much longer than the default justification used by branches 7:10ff5895aa57
178 177 ---- test heads listings
179 178 changeset: 13:6ac12926b8c3
180 179 branch: b
181 180 tag: tip
182 181 user: test
183 182 date: Thu Jan 01 00:00:09 1970 +0000
184 183 summary: reopen branch with a change
185 184
186 185 changeset: 7:10ff5895aa57
187 186 branch: a branch name much longer than the default justification used by branches
188 187 user: test
189 188 date: Thu Jan 01 00:00:06 1970 +0000
190 189 summary: Adding d branch
191 190
192 191 changeset: 6:589736a22561
193 192 branch: c
194 193 user: test
195 194 date: Thu Jan 01 00:00:05 1970 +0000
196 195 summary: Adding c branch
197 196
198 197 changeset: 5:d8cbc61dbaa6
199 198 branch: a
200 199 parent: 2:881fe2b92ad0
201 200 user: test
202 201 date: Thu Jan 01 00:00:04 1970 +0000
203 202 summary: Adding b branch head 2
204 203
205 204 changeset: 0:19709c5a4e75
206 205 user: test
207 206 date: Thu Jan 01 00:00:00 1970 +0000
208 207 summary: Adding root node
209 208
210 209 % branch default
211 210 changeset: 0:19709c5a4e75
212 211 user: test
213 212 date: Thu Jan 01 00:00:00 1970 +0000
214 213 summary: Adding root node
215 214
216 215 % branch a
217 216 changeset: 5:d8cbc61dbaa6
218 217 branch: a
219 218 parent: 2:881fe2b92ad0
220 219 user: test
221 220 date: Thu Jan 01 00:00:04 1970 +0000
222 221 summary: Adding b branch head 2
223 222
224 223 no open branch heads found on branches a
225 224 % branch b
226 225 changeset: 13:6ac12926b8c3
227 226 branch: b
228 227 tag: tip
229 228 user: test
230 229 date: Thu Jan 01 00:00:09 1970 +0000
231 230 summary: reopen branch with a change
232 231
233 232 changeset: 13:6ac12926b8c3
234 233 branch: b
235 234 tag: tip
236 235 user: test
237 236 date: Thu Jan 01 00:00:09 1970 +0000
238 237 summary: reopen branch with a change
239 238
240 239 changeset: 11:c84627f3c15d
241 240 branch: b
242 241 user: test
243 242 date: Thu Jan 01 00:00:09 1970 +0000
244 243 summary: prune bad branch
245 244
@@ -1,87 +1,85 b''
1 1
2 2 % prepare repo a
3 3 adding bar
4 4 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5 5 marked working directory as branch mine
6 6 adding world
7 created new head
8 7 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9 8 marked working directory as branch other
10 9 adding bye
11 created new head
12 10 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
13 11 % test -U -u
14 12 abort: cannot specify both --noupdate and --updaterev
15 13 % test -U
16 14 requesting all changes
17 15 adding changesets
18 16 adding manifests
19 17 adding file changes
20 18 added 3 changesets with 3 changes to 3 files (+2 heads)
21 19 % test -u .
22 20 requesting all changes
23 21 adding changesets
24 22 adding manifests
25 23 adding file changes
26 24 added 3 changesets with 3 changes to 3 files (+2 heads)
27 25 updating to branch mine
28 26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 27 % test -u 0
30 28 requesting all changes
31 29 adding changesets
32 30 adding manifests
33 31 adding file changes
34 32 added 3 changesets with 3 changes to 3 files (+2 heads)
35 33 updating to branch default
36 34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 35 % test -u 1
38 36 requesting all changes
39 37 adding changesets
40 38 adding manifests
41 39 adding file changes
42 40 added 3 changesets with 3 changes to 3 files (+2 heads)
43 41 updating to branch mine
44 42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 43 % test -u 2
46 44 requesting all changes
47 45 adding changesets
48 46 adding manifests
49 47 adding file changes
50 48 added 3 changesets with 3 changes to 3 files (+2 heads)
51 49 updating to branch other
52 50 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 51 % test -r 0
54 52 requesting all changes
55 53 adding changesets
56 54 adding manifests
57 55 adding file changes
58 56 added 3 changesets with 3 changes to 3 files (+2 heads)
59 57 updating to branch other
60 58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 59 % test -r mine ... mine is ignored
62 60 requesting all changes
63 61 adding changesets
64 62 adding manifests
65 63 adding file changes
66 64 added 3 changesets with 3 changes to 3 files (+2 heads)
67 65 updating to branch other
68 66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 67 % test -b default
70 68 requesting all changes
71 69 adding changesets
72 70 adding manifests
73 71 adding file changes
74 72 added 3 changesets with 3 changes to 3 files (+2 heads)
75 73 updating to branch default
76 74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 75 % test
78 76 requesting all changes
79 77 adding changesets
80 78 adding manifests
81 79 adding file changes
82 80 added 1 changesets with 1 changes to 1 files
83 81 updating to branch other
84 82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 83 % test tip
86 84 updating to branch other
87 85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -1,314 +1,313 b''
1 1
2 2 % prepare repo a
3 3 % list files in store/data (should show a 'b.d')
4 4 .hg/store/data/a.i
5 5 .hg/store/data/b.d
6 6 .hg/store/data/b.i
7 7
8 8 % default operation
9 9 updating to branch default
10 10 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 11 a
12 12 checking changesets
13 13 checking manifests
14 14 crosschecking files in changesets and manifests
15 15 checking files
16 16 2 files, 11 changesets, 11 total revisions
17 17
18 18 % no update
19 19 a not present
20 20 checking changesets
21 21 checking manifests
22 22 crosschecking files in changesets and manifests
23 23 checking files
24 24 2 files, 11 changesets, 11 total revisions
25 25
26 26 % default destination
27 27 destination directory: a
28 28 updating to branch default
29 29 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 30 a
31 31
32 32 % check that we drop the file: from the path before
33 33 % writing the .hgrc
34 34 updating to branch default
35 35 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 36
37 37 % check that path aliases are expanded
38 38 a#0
39 39
40 40 % use --pull
41 41 requesting all changes
42 42 adding changesets
43 43 adding manifests
44 44 adding file changes
45 45 added 11 changesets with 11 changes to 2 files
46 46 updating to branch default
47 47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 48 checking changesets
49 49 checking manifests
50 50 crosschecking files in changesets and manifests
51 51 checking files
52 52 2 files, 11 changesets, 11 total revisions
53 53
54 54 % clone to .
55 55 updating to branch default
56 56 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 57
58 58
59 59 % *** tests for option -u ***
60 60
61 61
62 62 % adding some more history to repo a
63 63 % tag ref1
64 64 % updating back to ref1
65 65 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 66
67 67 % add branch 'stable' to repo a for later tests
68 68 marked working directory as branch stable
69 created new head
70 69 % tag ref2
71 70
72 71 % updating back to ref2
73 72 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
74 73
75 74 % parents of repo a
76 75 changeset: 13:e8ece76546a6
77 76 branch: stable
78 77 tag: ref2
79 78 parent: 10:a7949464abda
80 79 user: test
81 80 date: Thu Jan 01 00:00:00 1970 +0000
82 81 summary: starting branch stable
83 82
84 83
85 84 % repo a has two heads
86 85 changeset: 15:0aae7cf88f0d
87 86 branch: stable
88 87 tag: tip
89 88 user: test
90 89 date: Thu Jan 01 00:00:00 1970 +0000
91 90 summary: another change for branch stable
92 91
93 92 changeset: 12:f21241060d6a
94 93 user: test
95 94 date: Thu Jan 01 00:00:00 1970 +0000
96 95 summary: hacked default
97 96
98 97
99 98 % testing clone -U -u 1 a ua (must abort)
100 99 abort: cannot specify both --noupdate and --updaterev
101 100
102 101 % testing clone -u . a ua
103 102 updating to branch stable
104 103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
105 104
106 105 % repo ua has both heads
107 106 changeset: 15:0aae7cf88f0d
108 107 branch: stable
109 108 tag: tip
110 109 user: test
111 110 date: Thu Jan 01 00:00:00 1970 +0000
112 111 summary: another change for branch stable
113 112
114 113 changeset: 12:f21241060d6a
115 114 user: test
116 115 date: Thu Jan 01 00:00:00 1970 +0000
117 116 summary: hacked default
118 117
119 118
120 119 % same revision checked out in repo a and ua
121 120 e8ece76546a6
122 121 e8ece76546a6
123 122
124 123 % testing clone --pull -u . a ua
125 124 requesting all changes
126 125 adding changesets
127 126 adding manifests
128 127 adding file changes
129 128 added 16 changesets with 16 changes to 3 files (+1 heads)
130 129 updating to branch stable
131 130 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 131
133 132 % repo ua has both heads
134 133 changeset: 15:0aae7cf88f0d
135 134 branch: stable
136 135 tag: tip
137 136 user: test
138 137 date: Thu Jan 01 00:00:00 1970 +0000
139 138 summary: another change for branch stable
140 139
141 140 changeset: 12:f21241060d6a
142 141 user: test
143 142 date: Thu Jan 01 00:00:00 1970 +0000
144 143 summary: hacked default
145 144
146 145
147 146 % same revision checked out in repo a and ua
148 147 e8ece76546a6
149 148 e8ece76546a6
150 149
151 150 % testing clone -u stable a ua
152 151 updating to branch stable
153 152 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 153
155 154 % repo ua has both heads
156 155 changeset: 15:0aae7cf88f0d
157 156 branch: stable
158 157 tag: tip
159 158 user: test
160 159 date: Thu Jan 01 00:00:00 1970 +0000
161 160 summary: another change for branch stable
162 161
163 162 changeset: 12:f21241060d6a
164 163 user: test
165 164 date: Thu Jan 01 00:00:00 1970 +0000
166 165 summary: hacked default
167 166
168 167
169 168 % branch stable is checked out
170 169 changeset: 15:0aae7cf88f0d
171 170 branch: stable
172 171 tag: tip
173 172 user: test
174 173 date: Thu Jan 01 00:00:00 1970 +0000
175 174 summary: another change for branch stable
176 175
177 176
178 177 % testing clone a ua
179 178 updating to branch default
180 179 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 180
182 181 % repo ua has both heads
183 182 changeset: 15:0aae7cf88f0d
184 183 branch: stable
185 184 tag: tip
186 185 user: test
187 186 date: Thu Jan 01 00:00:00 1970 +0000
188 187 summary: another change for branch stable
189 188
190 189 changeset: 12:f21241060d6a
191 190 user: test
192 191 date: Thu Jan 01 00:00:00 1970 +0000
193 192 summary: hacked default
194 193
195 194
196 195 % branch default is checked out
197 196 changeset: 12:f21241060d6a
198 197 user: test
199 198 date: Thu Jan 01 00:00:00 1970 +0000
200 199 summary: hacked default
201 200
202 201
203 202 % testing clone -u . a#stable ua
204 203 requesting all changes
205 204 adding changesets
206 205 adding manifests
207 206 adding file changes
208 207 added 14 changesets with 14 changes to 3 files
209 208 updating to branch stable
210 209 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
211 210
212 211 % repo ua has only branch stable
213 212 changeset: 13:0aae7cf88f0d
214 213 branch: stable
215 214 tag: tip
216 215 user: test
217 216 date: Thu Jan 01 00:00:00 1970 +0000
218 217 summary: another change for branch stable
219 218
220 219 changeset: 10:a7949464abda
221 220 user: test
222 221 date: Thu Jan 01 00:00:00 1970 +0000
223 222 summary: test
224 223
225 224
226 225 % same revision checked out in repo a and ua
227 226 e8ece76546a6
228 227 e8ece76546a6
229 228
230 229 % testing clone -u . -r stable a ua
231 230 requesting all changes
232 231 adding changesets
233 232 adding manifests
234 233 adding file changes
235 234 added 14 changesets with 14 changes to 3 files
236 235 updating to branch stable
237 236 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
238 237
239 238 % repo ua has only branch stable
240 239 changeset: 13:0aae7cf88f0d
241 240 branch: stable
242 241 tag: tip
243 242 user: test
244 243 date: Thu Jan 01 00:00:00 1970 +0000
245 244 summary: another change for branch stable
246 245
247 246 changeset: 10:a7949464abda
248 247 user: test
249 248 date: Thu Jan 01 00:00:00 1970 +0000
250 249 summary: test
251 250
252 251
253 252 % same revision checked out in repo a and ua
254 253 e8ece76546a6
255 254 e8ece76546a6
256 255
257 256 % testing clone -r stable a ua
258 257 requesting all changes
259 258 adding changesets
260 259 adding manifests
261 260 adding file changes
262 261 added 14 changesets with 14 changes to 3 files
263 262 updating to branch stable
264 263 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
265 264
266 265 % repo ua has only branch stable
267 266 changeset: 13:0aae7cf88f0d
268 267 branch: stable
269 268 tag: tip
270 269 user: test
271 270 date: Thu Jan 01 00:00:00 1970 +0000
272 271 summary: another change for branch stable
273 272
274 273 changeset: 10:a7949464abda
275 274 user: test
276 275 date: Thu Jan 01 00:00:00 1970 +0000
277 276 summary: test
278 277
279 278
280 279 % branch stable is checked out
281 280 changeset: 13:0aae7cf88f0d
282 281 branch: stable
283 282 tag: tip
284 283 user: test
285 284 date: Thu Jan 01 00:00:00 1970 +0000
286 285 summary: another change for branch stable
287 286
288 287
289 288 % testing clone -u . -r stable -r default a ua
290 289 requesting all changes
291 290 adding changesets
292 291 adding manifests
293 292 adding file changes
294 293 added 16 changesets with 16 changes to 3 files (+1 heads)
295 294 updating to branch stable
296 295 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
297 296
298 297 % repo ua has two heads
299 298 changeset: 15:0aae7cf88f0d
300 299 branch: stable
301 300 tag: tip
302 301 user: test
303 302 date: Thu Jan 01 00:00:00 1970 +0000
304 303 summary: another change for branch stable
305 304
306 305 changeset: 12:f21241060d6a
307 306 user: test
308 307 date: Thu Jan 01 00:00:00 1970 +0000
309 308 summary: hacked default
310 309
311 310
312 311 % same revision checked out in repo a and ua
313 312 e8ece76546a6
314 313 e8ece76546a6
@@ -1,74 +1,73 b''
1 1 adding a
2 2 marked working directory as branch brancha
3 3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 4 marked working directory as branch branchb
5 5 adding b
6 created new head
7 6 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
8 7 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9 8 % convert with datesort
10 9 initializing destination t-datesort repository
11 10 scanning source...
12 11 sorting...
13 12 converting...
14 13 8 a0
15 14 7 a1
16 15 6 a2
17 16 5 a3
18 17 4 a4
19 18 3 b0
20 19 2 a5
21 20 1 a6
22 21 0 b1
23 22 % graph converted repo
24 23 o 8 "b1"
25 24 |
26 25 | o 7 "a6"
27 26 | |
28 27 | o 6 "a5"
29 28 | |
30 29 o | 5 "b0"
31 30 | |
32 31 | o 4 "a4"
33 32 | |
34 33 | o 3 "a3"
35 34 | |
36 35 | o 2 "a2"
37 36 | |
38 37 | o 1 "a1"
39 38 |/
40 39 o 0 "a0"
41 40
42 41 % convert with datesort (default mode)
43 42 initializing destination t-sourcesort repository
44 43 scanning source...
45 44 sorting...
46 45 converting...
47 46 8 a0
48 47 7 a1
49 48 6 a2
50 49 5 a3
51 50 4 b0
52 51 3 a4
53 52 2 a5
54 53 1 a6
55 54 0 b1
56 55 % graph converted repo
57 56 o 8 "b1"
58 57 |
59 58 | o 7 "a6"
60 59 | |
61 60 | o 6 "a5"
62 61 | |
63 62 | o 5 "a4"
64 63 | |
65 64 o | 4 "b0"
66 65 | |
67 66 | o 3 "a3"
68 67 | |
69 68 | o 2 "a2"
70 69 | |
71 70 | o 1 "a1"
72 71 |/
73 72 o 0 "a0"
74 73
@@ -1,217 +1,217 b''
1 1 % test fetch with default branches only
2 2 adding a
3 3 updating to branch default
4 4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5 5 updating to branch default
6 6 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7 7 adding b
8 8 1:97d72e5f12c7
9 9 % should pull one change
10 10 pulling from ../a
11 11 searching for changes
12 12 adding changesets
13 13 adding manifests
14 14 adding file changes
15 15 added 1 changesets with 1 changes to 1 files
16 16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 17 1:97d72e5f12c7
18 18 adding c
19 19 updating to branch default
20 20 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 21 updating to branch default
22 22 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 23 % should merge c into a
24 24 pulling from ../a
25 25 searching for changes
26 26 adding changesets
27 27 adding manifests
28 28 adding file changes
29 29 added 1 changesets with 1 changes to 1 files (+1 heads)
30 30 updating to 2:97d72e5f12c7
31 31 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32 32 merging with 1:5e056962225c
33 33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 34 new changeset 3:cd3a41621cf0 merges remote changes with local
35 35 a
36 36 b
37 37 c
38 38 % fetch over http, no auth
39 39 pulling from http://localhost:$HGPORT/
40 40 searching for changes
41 41 adding changesets
42 42 adding manifests
43 43 adding file changes
44 44 added 1 changesets with 1 changes to 1 files (+1 heads)
45 45 updating to 2:97d72e5f12c7
46 46 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
47 47 merging with 1:5e056962225c
48 48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 49 new changeset 3:... merges remote changes with local
50 50 Automated merge with http://localhost:$HGPORT/
51 51 % fetch over http with auth (should be hidden in desc)
52 52 pulling from http://user:***@localhost:$HGPORT/
53 53 searching for changes
54 54 adding changesets
55 55 adding manifests
56 56 adding file changes
57 57 added 1 changesets with 1 changes to 1 files (+1 heads)
58 58 updating to 2:97d72e5f12c7
59 59 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 60 merging with 1:5e056962225c
61 61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 62 new changeset 3:... merges remote changes with local
63 63 Automated merge with http://localhost:$HGPORT/
64 64 updating to branch default
65 65 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 66 updating to branch default
67 67 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 68 adding f
69 69 adding g
70 70 % should merge f into g
71 71 pulling from ../f
72 72 searching for changes
73 73 adding changesets
74 74 adding manifests
75 75 adding file changes
76 76 added 1 changesets with 1 changes to 1 files (+1 heads)
77 77 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
78 78 merging with 3:cc6a3744834d
79 79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 80 new changeset 4:55aa4f32ec59 merges remote changes with local
81 81 % should abort, because i is modified
82 82 abort: working directory is missing some files
83 83 % test fetch with named branches
84 84 adding a
85 85 marked working directory as branch a
86 86 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 87 marked working directory as branch b
88 88 adding b
89 created new head
90 89
91 90 % pull in change on foreign branch
92 91 updating to branch default
93 92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 93 updating to branch default
95 94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 97 pulling from n1
99 98 searching for changes
100 99 adding changesets
101 100 adding manifests
102 101 adding file changes
103 102 added 1 changesets with 1 changes to 1 files
104 103 % parent should be 2 (no automatic update)
105 104 2
106 105
107 106 % pull in changes on both foreign and local branches
108 107 updating to branch default
109 108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
110 109 updating to branch default
111 110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 111 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 112 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
115 114 pulling from n1
116 115 searching for changes
117 116 adding changesets
118 117 adding manifests
119 118 adding file changes
120 119 added 2 changesets with 2 changes to 2 files
121 120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 121 % parent should be 4 (fast forward)
123 122 4
124 123
125 124 % pull changes on foreign (2 new heads) and local (1 new head) branches
126 125 % with a local change
127 126 updating to branch default
128 127 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 128 updating to branch default
130 129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 130 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 131 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 132 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
134 133 created new head
135 134 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 135 adding c
137 136 pulling from n1
138 137 searching for changes
139 138 adding changesets
140 139 adding manifests
141 140 adding file changes
142 141 added 3 changesets with 3 changes to 2 files (+2 heads)
143 142 updating to 5:708c6cce3d26
144 143 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
145 144 merging with 3:d83427717b1f
146 145 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 146 new changeset 7:48f1a33f52af merges remote changes with local
148 147 % parent should be 7 (new merge changeset)
149 148 7
150 149 % pull in changes on foreign (merge of local branch) and local (2 new
151 150 % heads) with a local change
152 151 updating to branch default
153 152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 153 updating to branch default
155 154 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
157 156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
158 157 (branch merge, don't forget to commit)
158 created new head
159 159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 created new head
161 160 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
162 161 created new head
163 162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
164 163 pulling from n1
165 164 searching for changes
166 165 adding changesets
167 166 adding manifests
168 167 adding file changes
169 168 added 3 changesets with 2 changes to 1 files (+2 heads)
170 169 not merging with 1 other new branch heads (use "hg heads ." and "hg merge" to merge them)
171 170 % parent should be 3 (fetch did not merge anything)
172 171 3
173 172 % pull in change on different branch than dirstate
174 173 adding a
175 174 updating to branch default
176 175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
177 176 marked working directory as branch topic
178 177 abort: working dir not at branch tip (use "hg update" to check out branch tip)
179 178 % parent should be 0 (fetch did not update or merge anything)
180 179 0
181 180 % test fetch with inactive branches
182 181 adding a
183 182 marked working directory as branch second
184 183 adding b
185 184 marked working directory as branch default
186 185 adding c
186 created new head
187 187 updating to branch default
188 188 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 189 % fetch should succeed
190 190 pulling from ../ib1
191 191 searching for changes
192 192 no changes found
193 193 % test issue1726
194 194 adding a
195 195 updating to branch default
196 196 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
197 197 pulling from ../i1726r1
198 198 searching for changes
199 199 adding changesets
200 200 adding manifests
201 201 adding file changes
202 202 added 1 changesets with 1 changes to 1 files (+1 heads)
203 203 updating to 2:7837755a2789
204 204 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
205 205 merging with 1:d1f0c6c48ebd
206 206 merging a
207 207 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
208 208 new changeset 3 merges remote changes with local
209 209 3
210 210
211 211 % test issue2047
212 212 pulling from ../i2047a
213 213 searching for changes
214 214 adding changesets
215 215 adding manifests
216 216 adding file changes
217 217 added 1 changesets with 1 changes to 1 files
@@ -1,10 +1,11 b''
1 1 adding a
2 2 marked working directory as branch b
3 3 adding b
4 4 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5 5 fast-forward
6 6 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7 7 (branch merge, don't forget to commit)
8 created new head
8 9 bogus fast-forward should fail
9 10 abort: can't merge with ancestor
10 11 done
@@ -1,519 +1,518 b''
1 1 % hg kwdemo
2 2 [extensions]
3 3 keyword =
4 4 [keyword]
5 5 demo.txt =
6 6 [keywordmaps]
7 7 Author = {author|user}
8 8 Date = {date|utcdate}
9 9 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
10 10 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
11 11 RCSFile = {file|basename},v
12 12 RCSfile = {file|basename},v
13 13 Revision = {node|short}
14 14 Source = {root}/{file},v
15 15 $Author: test $
16 16 $Date: 2000/00/00 00:00:00 $
17 17 $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
18 18 $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
19 19 $RCSFile: demo.txt,v $
20 20 $RCSfile: demo.txt,v $
21 21 $Revision: xxxxxxxxxxxx $
22 22 $Source: /TMP/demo.txt,v $
23 23 [extensions]
24 24 keyword =
25 25 [keyword]
26 26 demo.txt =
27 27 [keywordmaps]
28 28 Branch = {branches}
29 29 $Branch: demobranch $
30 30 % kwshrink should exit silently in empty/invalid repo
31 31 pulling from test-keyword.hg
32 32 requesting all changes
33 33 adding changesets
34 34 adding manifests
35 35 adding file changes
36 36 added 1 changesets with 1 changes to 1 files
37 37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 38 % cat
39 39 expand $Id$
40 40 do not process $Id:
41 41 xxx $
42 42 ignore $Id$
43 43 % no kwfiles
44 44 % untracked candidates
45 45 k a
46 46 % addremove
47 47 adding a
48 48 adding b
49 49 % status
50 50 A a
51 51 A b
52 52 % default keyword expansion including commit hook
53 53 % interrupted commit should not change state or run commit hook
54 54 abort: empty commit message
55 55 % status
56 56 A a
57 57 A b
58 58 % commit
59 59 a
60 60 b
61 61 overwriting a expanding keywords
62 62 running hook commit.test: cp a hooktest
63 63 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
64 64 % status
65 65 ? hooktest
66 66 % identify
67 67 ef63ca68695b
68 68 % cat
69 69 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
70 70 do not process $Id:
71 71 xxx $
72 72 ignore $Id$
73 73 % hg cat
74 74 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
75 75 do not process $Id:
76 76 xxx $
77 77 ignore $Id$
78 78 a
79 79 % diff a hooktest
80 80 % removing commit hook from config
81 81 % bundle
82 82 2 changesets found
83 83 % notify on pull to check whether keywords stay as is in email
84 84 % ie. if patch.diff wrapper acts as it should
85 85 % pull from bundle
86 86 pulling from ../kw.hg
87 87 requesting all changes
88 88 adding changesets
89 89 adding manifests
90 90 adding file changes
91 91 added 2 changesets with 3 changes to 3 files
92 92
93 93 diff -r 000000000000 -r a2392c293916 sym
94 94 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
95 95 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
96 96 @@ -0,0 +1,1 @@
97 97 +a
98 98 \ No newline at end of file
99 99
100 100 diff -r a2392c293916 -r ef63ca68695b a
101 101 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
102 102 +++ b/a Thu Jan 01 00:00:00 1970 +0000
103 103 @@ -0,0 +1,3 @@
104 104 +expand $Id$
105 105 +do not process $Id:
106 106 +xxx $
107 107 diff -r a2392c293916 -r ef63ca68695b b
108 108 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
109 109 +++ b/b Thu Jan 01 00:00:00 1970 +0000
110 110 @@ -0,0 +1,1 @@
111 111 +ignore $Id$
112 112 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 113 % remove notify config
114 114 % touch
115 115 % status
116 116 % update
117 117 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 118 % cat
119 119 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
120 120 do not process $Id:
121 121 xxx $
122 122 ignore $Id$
123 123 % check whether expansion is filewise
124 124 % commit c
125 125 adding c
126 126 % force expansion
127 127 overwriting a expanding keywords
128 128 overwriting c expanding keywords
129 129 % compare changenodes in a c
130 130 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
131 131 do not process $Id:
132 132 xxx $
133 133 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
134 134 tests for different changenodes
135 135 % record
136 136 diff --git a/a b/a
137 137 2 hunks, 2 lines changed
138 138 examine changes to 'a'? [Ynsfdaq?]
139 139 @@ -1,3 +1,4 @@
140 140 expand $Id$
141 141 +foo
142 142 do not process $Id:
143 143 xxx $
144 144 record change 1/2 to 'a'? [Ynsfdaq?]
145 145 @@ -2,2 +3,3 @@
146 146 do not process $Id:
147 147 xxx $
148 148 +bar
149 149 record change 2/2 to 'a'? [Ynsfdaq?]
150 150
151 151 d17e03c92c97+ tip
152 152 M a
153 153 % cat modified file
154 154 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
155 155 foo
156 156 do not process $Id:
157 157 xxx $
158 158 bar
159 159 diff -r d17e03c92c97 a
160 160 --- a/a Wed Dec 31 23:59:51 1969 -0000
161 161 @@ -2,3 +2,4 @@
162 162 foo
163 163 do not process $Id:
164 164 xxx $
165 165 +bar
166 166 rolling back to revision 3 (undo commit)
167 167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 168 % init --mq
169 169 % qimport
170 170 % commit --mq
171 171 % keywords should not be expanded in patch
172 172 # HG changeset patch
173 173 # User User Name <user@example.com>
174 174 # Date 1 0
175 175 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
176 176 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
177 177 cndiff
178 178
179 179 diff -r ef63ca68695b -r 40a904bbbe4c c
180 180 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
181 181 +++ b/c Thu Jan 01 00:00:01 1970 +0000
182 182 @@ -0,0 +1,2 @@
183 183 +$Id$
184 184 +tests for different changenodes
185 185 % qpop
186 186 popping mqtest.diff
187 187 patch queue now empty
188 188 % qgoto - should imply qpush
189 189 applying mqtest.diff
190 190 now at: mqtest.diff
191 191 % cat
192 192 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
193 193 tests for different changenodes
194 194 % hg cat
195 195 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
196 196 tests for different changenodes
197 197 % keyword should not be expanded in filelog
198 198 $Id$
199 199 tests for different changenodes
200 200 % qpop and move on
201 201 popping mqtest.diff
202 202 patch queue now empty
203 203 % copy
204 204 % kwfiles added
205 205 a
206 206 c
207 207 % commit
208 208 c
209 209 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
210 210 overwriting c expanding keywords
211 211 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
212 212 % cat a c
213 213 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
214 214 do not process $Id:
215 215 xxx $
216 216 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
217 217 do not process $Id:
218 218 xxx $
219 219 % touch copied c
220 220 % status
221 221 % kwfiles
222 222 a
223 223 c
224 224 % ignored files
225 225 I b
226 226 I sym
227 227 % all files
228 228 K a
229 229 K c
230 230 I b
231 231 I sym
232 232 % diff --rev
233 233 diff -r ef63ca68695b c
234 234 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
235 235 @@ -0,0 +1,3 @@
236 236 +expand $Id$
237 237 +do not process $Id:
238 238 +xxx $
239 239 % rollback
240 240 rolling back to revision 2 (undo commit)
241 241 % status
242 242 A c
243 243 % update -C
244 244 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
245 245 % custom keyword expansion
246 246 % try with kwdemo
247 247 [extensions]
248 248 keyword =
249 249 [keyword]
250 250 ** =
251 251 b = ignore
252 252 demo.txt =
253 253 [keywordmaps]
254 254 Xinfo = {author}: {desc}
255 255 $Xinfo: test: hg keyword configuration and expansion example $
256 256 % cat
257 257 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
258 258 do not process $Id:
259 259 xxx $
260 260 ignore $Id$
261 261 % hg cat
262 262 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
263 263 do not process $Id:
264 264 xxx $
265 265 ignore $Id$
266 266 a
267 267 % interrupted commit should not change state
268 268 abort: empty commit message
269 269 % status
270 270 M a
271 271 ? c
272 272 ? log
273 273 % commit
274 274 a
275 275 overwriting a expanding keywords
276 276 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
277 277 % status
278 278 ? c
279 279 % verify
280 280 checking changesets
281 281 checking manifests
282 282 crosschecking files in changesets and manifests
283 283 checking files
284 284 3 files, 3 changesets, 4 total revisions
285 285 % cat
286 286 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
287 287 do not process $Id:
288 288 xxx $
289 289 $Xinfo: User Name <user@example.com>: firstline $
290 290 ignore $Id$
291 291 % hg cat
292 292 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
293 293 do not process $Id:
294 294 xxx $
295 295 $Xinfo: User Name <user@example.com>: firstline $
296 296 ignore $Id$
297 297 a
298 298 % annotate
299 299 1: expand $Id$
300 300 1: do not process $Id:
301 301 1: xxx $
302 302 2: $Xinfo$
303 303 % remove
304 304 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
305 305 % status
306 306 ? c
307 307 % rollback
308 308 rolling back to revision 3 (undo commit)
309 309 % status
310 310 R a
311 311 ? c
312 312 % revert a
313 313 % cat a
314 314 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
315 315 do not process $Id:
316 316 xxx $
317 317 $Xinfo: User Name <user@example.com>: firstline $
318 318 % clone to test incoming
319 319 requesting all changes
320 320 adding changesets
321 321 adding manifests
322 322 adding file changes
323 323 added 2 changesets with 3 changes to 3 files
324 324 updating to branch default
325 325 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
326 326 % incoming
327 327 comparing with test-keyword/Test
328 328 searching for changes
329 329 changeset: 2:bb948857c743
330 330 tag: tip
331 331 user: User Name <user@example.com>
332 332 date: Thu Jan 01 00:00:02 1970 +0000
333 333 summary: firstline
334 334
335 335 % commit rejecttest
336 336 a
337 337 overwriting a expanding keywords
338 338 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
339 339 % export
340 340 % import
341 341 applying ../rejecttest.diff
342 342 % cat
343 343 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
344 344 do not process $Id: rejecttest
345 345 xxx $
346 346 $Xinfo: User Name <user@example.com>: rejects? $
347 347 ignore $Id$
348 348
349 349 % rollback
350 350 rolling back to revision 3 (undo commit)
351 351 % clean update
352 352 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
353 353 % kwexpand/kwshrink on selected files
354 354 % copy a x/a
355 355 % kwexpand a
356 356 overwriting a expanding keywords
357 357 % kwexpand x/a should abort
358 358 abort: outstanding uncommitted changes
359 359 x/a
360 360 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
361 361 overwriting x/a expanding keywords
362 362 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
363 363 % cat a
364 364 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
365 365 do not process $Id:
366 366 xxx $
367 367 $Xinfo: User Name <user@example.com>: xa $
368 368 % kwshrink a inside directory x
369 369 overwriting x/a shrinking keywords
370 370 % cat a
371 371 expand $Id$
372 372 do not process $Id:
373 373 xxx $
374 374 $Xinfo$
375 375 % kwexpand nonexistent
376 376 nonexistent:
377 377 % hg serve
378 378 % expansion
379 379 % hgweb file
380 380 200 Script output follows
381 381
382 382 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
383 383 do not process $Id:
384 384 xxx $
385 385 $Xinfo: User Name <user@example.com>: firstline $
386 386 % no expansion
387 387 % hgweb annotate
388 388 200 Script output follows
389 389
390 390
391 391 user@1: expand $Id$
392 392 user@1: do not process $Id:
393 393 user@1: xxx $
394 394 user@2: $Xinfo$
395 395
396 396
397 397
398 398
399 399 % hgweb changeset
400 400 200 Script output follows
401 401
402 402
403 403 # HG changeset patch
404 404 # User User Name <user@example.com>
405 405 # Date 3 0
406 406 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
407 407 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
408 408 xa
409 409
410 410 diff -r bb948857c743 -r b4560182a3f9 x/a
411 411 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
412 412 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
413 413 @@ -0,0 +1,4 @@
414 414 +expand $Id$
415 415 +do not process $Id:
416 416 +xxx $
417 417 +$Xinfo$
418 418
419 419 % hgweb filediff
420 420 200 Script output follows
421 421
422 422
423 423 diff -r ef63ca68695b -r bb948857c743 a
424 424 --- a/a Thu Jan 01 00:00:00 1970 +0000
425 425 +++ b/a Thu Jan 01 00:00:02 1970 +0000
426 426 @@ -1,3 +1,4 @@
427 427 expand $Id$
428 428 do not process $Id:
429 429 xxx $
430 430 +$Xinfo$
431 431
432 432
433 433
434 434
435 435 % errors encountered
436 436 % merge/resolve
437 437 % simplemerge
438 438 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
439 439 created new head
440 440 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 441 (branch merge, don't forget to commit)
442 442 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
443 443 foo
444 444 % conflict
445 445 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
446 446 created new head
447 447 merging m
448 448 warning: conflicts during merge.
449 449 merging m failed!
450 450 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
451 451 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
452 452 % keyword stays outside conflict zone
453 453 $Id$
454 454 <<<<<<< local
455 455 bar
456 456 =======
457 457 foo
458 458 >>>>>>> other
459 459 % resolve to local
460 460 $Id: m 41efa6d38e9b Thu, 01 Jan 1970 00:00:00 +0000 test $
461 461 bar
462 462 % test restricted mode with transplant -b
463 463 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
464 464 marked working directory as branch foo
465 created new head
466 465 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
467 466 applying 4aa30d025d50
468 467 4aa30d025d50 transplanted to 5a4da427c162
469 468 % no expansion in changeset
470 469 changeset: 11:5a4da427c162
471 470 tag: tip
472 471 parent: 9:41efa6d38e9b
473 472 user: test
474 473 date: Thu Jan 01 00:00:00 1970 +0000
475 474 summary: 9foobranch
476 475
477 476 diff -r 41efa6d38e9b -r 5a4da427c162 a
478 477 --- a/a Thu Jan 01 00:00:00 1970 +0000
479 478 +++ b/a Thu Jan 01 00:00:00 1970 +0000
480 479 @@ -1,3 +1,4 @@
481 480 +foobranch
482 481 expand $Id$
483 482 do not process $Id:
484 483 xxx $
485 484
486 485 % expansion in file
487 486 foobranch
488 487 expand $Id: a 5a4da427c162 Thu, 01 Jan 1970 00:00:00 +0000 test $
489 488 % switch off expansion
490 489 % kwshrink with unknown file u
491 490 overwriting a shrinking keywords
492 491 overwriting m shrinking keywords
493 492 overwriting x/a shrinking keywords
494 493 % cat
495 494 expand $Id$
496 495 do not process $Id:
497 496 xxx $
498 497 $Xinfo$
499 498 ignore $Id$
500 499 % hg cat
501 500 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
502 501 do not process $Id:
503 502 xxx $
504 503 $Xinfo: User Name <user@example.com>: firstline $
505 504 ignore $Id$
506 505 a
507 506 % cat
508 507 expand $Id$
509 508 do not process $Id:
510 509 xxx $
511 510 $Xinfo$
512 511 ignore $Id$
513 512 % hg cat
514 513 expand $Id$
515 514 do not process $Id:
516 515 xxx $
517 516 $Xinfo$
518 517 ignore $Id$
519 518 a
@@ -1,467 +1,466 b''
1 1 adding a
2 2 changeset: 0:8580ff50825a
3 3 user: test
4 4 date: Thu Jan 01 00:00:01 1970 +0000
5 5 summary: a
6 6
7 7 % -f, directory
8 8 abort: cannot follow nonexistent file: "dir"
9 9 % -f, but no args
10 10 changeset: 4:66c1345dc4f9
11 11 tag: tip
12 12 user: test
13 13 date: Thu Jan 01 00:00:05 1970 +0000
14 14 summary: e
15 15
16 16 changeset: 3:7c6c671bb7cc
17 17 user: test
18 18 date: Thu Jan 01 00:00:04 1970 +0000
19 19 summary: d
20 20
21 21 changeset: 2:41dd4284081e
22 22 user: test
23 23 date: Thu Jan 01 00:00:03 1970 +0000
24 24 summary: c
25 25
26 26 changeset: 1:784de7cef101
27 27 user: test
28 28 date: Thu Jan 01 00:00:02 1970 +0000
29 29 summary: b
30 30
31 31 changeset: 0:8580ff50825a
32 32 user: test
33 33 date: Thu Jan 01 00:00:01 1970 +0000
34 34 summary: a
35 35
36 36 % one rename
37 37 changeset: 0:8580ff50825a
38 38 user: test
39 39 date: Thu Jan 01 00:00:01 1970 +0000
40 40 files: a
41 41 description:
42 42 a
43 43
44 44
45 45 % many renames
46 46 changeset: 4:66c1345dc4f9
47 47 tag: tip
48 48 user: test
49 49 date: Thu Jan 01 00:00:05 1970 +0000
50 50 files: dir/b e
51 51 description:
52 52 e
53 53
54 54
55 55 changeset: 2:41dd4284081e
56 56 user: test
57 57 date: Thu Jan 01 00:00:03 1970 +0000
58 58 files: b dir/b
59 59 description:
60 60 c
61 61
62 62
63 63 changeset: 1:784de7cef101
64 64 user: test
65 65 date: Thu Jan 01 00:00:02 1970 +0000
66 66 files: b
67 67 description:
68 68 b
69 69
70 70
71 71 changeset: 0:8580ff50825a
72 72 user: test
73 73 date: Thu Jan 01 00:00:01 1970 +0000
74 74 files: a
75 75 description:
76 76 a
77 77
78 78
79 79 % log copies with --copies
80 80 4 e (dir/b)
81 81 3 b (a)
82 82 2 dir/b (b)
83 83 1 b (a)
84 84 0
85 85 % log copies switch without --copies, with old filecopy template
86 86 4
87 87 3
88 88 2
89 89 1
90 90 0
91 91 % log copies switch with --copies
92 92 4 e (dir/b)
93 93 3 b (a)
94 94 2 dir/b (b)
95 95 1 b (a)
96 96 0
97 97 % log copies with hardcoded style and with --style=default
98 98 changeset: 4:66c1345dc4f9
99 99 tag: tip
100 100 user: test
101 101 date: Thu Jan 01 00:00:05 1970 +0000
102 102 files: dir/b e
103 103 copies: e (dir/b)
104 104 description:
105 105 e
106 106
107 107
108 108 changeset: 4:66c1345dc4f9
109 109 tag: tip
110 110 user: test
111 111 date: Thu Jan 01 00:00:05 1970 +0000
112 112 files: dir/b e
113 113 copies: e (dir/b)
114 114 description:
115 115 e
116 116
117 117
118 118 % log copies, non-linear manifest
119 119 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
120 120 adding foo
121 121 created new head
122 122 5 e (dir/b)
123 123 % log copies, execute bit set
124 124 6
125 125 % log -p d
126 126 changeset: 3:7c6c671bb7cc
127 127 user: test
128 128 date: Thu Jan 01 00:00:04 1970 +0000
129 129 files: a b d
130 130 description:
131 131 d
132 132
133 133
134 134 diff -r 41dd4284081e -r 7c6c671bb7cc d
135 135 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
136 136 +++ b/d Thu Jan 01 00:00:04 1970 +0000
137 137 @@ -0,0 +1,1 @@
138 138 +a
139 139
140 140 adding base
141 141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
142 142 adding b1
143 143 created new head
144 144 % log -f
145 145 changeset: 3:e62f78d544b4
146 146 tag: tip
147 147 parent: 1:3d5bf5654eda
148 148 user: test
149 149 date: Thu Jan 01 00:00:01 1970 +0000
150 150 summary: b1
151 151
152 152 changeset: 1:3d5bf5654eda
153 153 user: test
154 154 date: Thu Jan 01 00:00:01 1970 +0000
155 155 summary: r1
156 156
157 157 changeset: 0:67e992f2c4f3
158 158 user: test
159 159 date: Thu Jan 01 00:00:01 1970 +0000
160 160 summary: base
161 161
162 162 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
163 163 adding b2
164 164 created new head
165 165 % log -f -r 1:tip
166 166 changeset: 1:3d5bf5654eda
167 167 user: test
168 168 date: Thu Jan 01 00:00:01 1970 +0000
169 169 summary: r1
170 170
171 171 changeset: 2:60c670bf5b30
172 172 user: test
173 173 date: Thu Jan 01 00:00:01 1970 +0000
174 174 summary: r2
175 175
176 176 changeset: 3:e62f78d544b4
177 177 parent: 1:3d5bf5654eda
178 178 user: test
179 179 date: Thu Jan 01 00:00:01 1970 +0000
180 180 summary: b1
181 181
182 182 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
183 183 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
184 184 (branch merge, don't forget to commit)
185 185 % log -r . with two parents
186 186 changeset: 3:e62f78d544b4
187 187 parent: 1:3d5bf5654eda
188 188 user: test
189 189 date: Thu Jan 01 00:00:01 1970 +0000
190 190 summary: b1
191 191
192 192 % log -r . with one parent
193 193 changeset: 5:302e9dd6890d
194 194 tag: tip
195 195 parent: 3:e62f78d544b4
196 196 parent: 4:ddb82e70d1a1
197 197 user: test
198 198 date: Thu Jan 01 00:00:01 1970 +0000
199 199 summary: m12
200 200
201 201 % log --follow-first
202 202 changeset: 6:2404bbcab562
203 203 tag: tip
204 204 user: test
205 205 date: Thu Jan 01 00:00:01 1970 +0000
206 206 summary: b1.1
207 207
208 208 changeset: 5:302e9dd6890d
209 209 parent: 3:e62f78d544b4
210 210 parent: 4:ddb82e70d1a1
211 211 user: test
212 212 date: Thu Jan 01 00:00:01 1970 +0000
213 213 summary: m12
214 214
215 215 changeset: 3:e62f78d544b4
216 216 parent: 1:3d5bf5654eda
217 217 user: test
218 218 date: Thu Jan 01 00:00:01 1970 +0000
219 219 summary: b1
220 220
221 221 changeset: 1:3d5bf5654eda
222 222 user: test
223 223 date: Thu Jan 01 00:00:01 1970 +0000
224 224 summary: r1
225 225
226 226 changeset: 0:67e992f2c4f3
227 227 user: test
228 228 date: Thu Jan 01 00:00:01 1970 +0000
229 229 summary: base
230 230
231 231 % log -P 2
232 232 changeset: 6:2404bbcab562
233 233 tag: tip
234 234 user: test
235 235 date: Thu Jan 01 00:00:01 1970 +0000
236 236 summary: b1.1
237 237
238 238 changeset: 5:302e9dd6890d
239 239 parent: 3:e62f78d544b4
240 240 parent: 4:ddb82e70d1a1
241 241 user: test
242 242 date: Thu Jan 01 00:00:01 1970 +0000
243 243 summary: m12
244 244
245 245 changeset: 4:ddb82e70d1a1
246 246 parent: 0:67e992f2c4f3
247 247 user: test
248 248 date: Thu Jan 01 00:00:01 1970 +0000
249 249 summary: b2
250 250
251 251 changeset: 3:e62f78d544b4
252 252 parent: 1:3d5bf5654eda
253 253 user: test
254 254 date: Thu Jan 01 00:00:01 1970 +0000
255 255 summary: b1
256 256
257 257 % log -r tip -p --git
258 258 changeset: 6:2404bbcab562
259 259 tag: tip
260 260 user: test
261 261 date: Thu Jan 01 00:00:01 1970 +0000
262 262 summary: b1.1
263 263
264 264 diff --git a/b1 b/b1
265 265 --- a/b1
266 266 +++ b/b1
267 267 @@ -1,1 +1,2 @@
268 268 b1
269 269 +postm
270 270
271 271 % log -r ""
272 272 abort: 00changelog.i@: ambiguous identifier!
273 273 % log -r <some unknown node id>
274 274 abort: unknown revision '1000000000000000000000000000000000000000'!
275 275 % log -k r1
276 276 changeset: 1:3d5bf5654eda
277 277 user: test
278 278 date: Thu Jan 01 00:00:01 1970 +0000
279 279 summary: r1
280 280
281 281 % log -d -1
282 282 % log -p -l2 --color=always
283 283 changeset: 6:2404bbcab562
284 284 tag: tip
285 285 user: test
286 286 date: Thu Jan 01 00:00:01 1970 +0000
287 287 summary: b1.1
288 288
289 289 diff -r 302e9dd6890d -r 2404bbcab562 b1
290 290 --- a/b1 Thu Jan 01 00:00:01 1970 +0000
291 291 +++ b/b1 Thu Jan 01 00:00:01 1970 +0000
292 292 @@ -1,1 +1,2 @@
293 293 b1
294 294 +postm
295 295
296 296 changeset: 5:302e9dd6890d
297 297 parent: 3:e62f78d544b4
298 298 parent: 4:ddb82e70d1a1
299 299 user: test
300 300 date: Thu Jan 01 00:00:01 1970 +0000
301 301 summary: m12
302 302
303 303 diff -r e62f78d544b4 -r 302e9dd6890d b2
304 304 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
305 305 +++ b/b2 Thu Jan 01 00:00:01 1970 +0000
306 306 @@ -0,0 +1,1 @@
307 307 +b2
308 308
309 309 % log -r tip --stat
310 310 changeset: 6:2404bbcab562
311 311 tag: tip
312 312 user: test
313 313 date: Thu Jan 01 00:00:01 1970 +0000
314 314 summary: b1.1
315 315
316 316 b1 | 1 +
317 317 1 files changed, 1 insertions(+), 0 deletions(-)
318 318
319 319 adding a
320 320 adding b
321 321 changeset: 0:29a4c94f1924
322 322 user: User One <user1@example.org>
323 323 date: Thu Jan 01 00:00:00 1970 +0000
324 324 summary: a
325 325
326 326 changeset: 1:e834b5e69c0e
327 327 tag: tip
328 328 user: User Two <user2@example.org>
329 329 date: Thu Jan 01 00:00:00 1970 +0000
330 330 summary: b
331 331
332 332 changeset: 0:29a4c94f1924
333 333 user: User One <user1@example.org>
334 334 date: Thu Jan 01 00:00:00 1970 +0000
335 335 summary: a
336 336
337 337 adding a
338 338 marked working directory as branch test
339 339 adding b
340 340 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
341 341 adding c
342 created new head
343 342 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
344 343 adding c
345 344 % log -b default
346 345 changeset: 2:c3a4f03cc9a7
347 346 parent: 0:24427303d56f
348 347 user: test
349 348 date: Thu Jan 01 00:00:00 1970 +0000
350 349 summary: commit on default
351 350
352 351 changeset: 0:24427303d56f
353 352 user: test
354 353 date: Thu Jan 01 00:00:00 1970 +0000
355 354 summary: commit on default
356 355
357 356 % log -b test
358 357 changeset: 3:f5d8de11c2e2
359 358 branch: test
360 359 tag: tip
361 360 parent: 1:d32277701ccb
362 361 user: test
363 362 date: Thu Jan 01 00:00:00 1970 +0000
364 363 summary: commit on test
365 364
366 365 changeset: 1:d32277701ccb
367 366 branch: test
368 367 user: test
369 368 date: Thu Jan 01 00:00:00 1970 +0000
370 369 summary: commit on test
371 370
372 371 % log -b dummy
373 372 abort: unknown revision 'dummy'!
374 373 % log -b .
375 374 changeset: 3:f5d8de11c2e2
376 375 branch: test
377 376 tag: tip
378 377 parent: 1:d32277701ccb
379 378 user: test
380 379 date: Thu Jan 01 00:00:00 1970 +0000
381 380 summary: commit on test
382 381
383 382 changeset: 1:d32277701ccb
384 383 branch: test
385 384 user: test
386 385 date: Thu Jan 01 00:00:00 1970 +0000
387 386 summary: commit on test
388 387
389 388 % log -b default -b test
390 389 changeset: 3:f5d8de11c2e2
391 390 branch: test
392 391 tag: tip
393 392 parent: 1:d32277701ccb
394 393 user: test
395 394 date: Thu Jan 01 00:00:00 1970 +0000
396 395 summary: commit on test
397 396
398 397 changeset: 2:c3a4f03cc9a7
399 398 parent: 0:24427303d56f
400 399 user: test
401 400 date: Thu Jan 01 00:00:00 1970 +0000
402 401 summary: commit on default
403 402
404 403 changeset: 1:d32277701ccb
405 404 branch: test
406 405 user: test
407 406 date: Thu Jan 01 00:00:00 1970 +0000
408 407 summary: commit on test
409 408
410 409 changeset: 0:24427303d56f
411 410 user: test
412 411 date: Thu Jan 01 00:00:00 1970 +0000
413 412 summary: commit on default
414 413
415 414 % log -b default -b .
416 415 changeset: 3:f5d8de11c2e2
417 416 branch: test
418 417 tag: tip
419 418 parent: 1:d32277701ccb
420 419 user: test
421 420 date: Thu Jan 01 00:00:00 1970 +0000
422 421 summary: commit on test
423 422
424 423 changeset: 2:c3a4f03cc9a7
425 424 parent: 0:24427303d56f
426 425 user: test
427 426 date: Thu Jan 01 00:00:00 1970 +0000
428 427 summary: commit on default
429 428
430 429 changeset: 1:d32277701ccb
431 430 branch: test
432 431 user: test
433 432 date: Thu Jan 01 00:00:00 1970 +0000
434 433 summary: commit on test
435 434
436 435 changeset: 0:24427303d56f
437 436 user: test
438 437 date: Thu Jan 01 00:00:00 1970 +0000
439 438 summary: commit on default
440 439
441 440 % log -b . -b test
442 441 changeset: 3:f5d8de11c2e2
443 442 branch: test
444 443 tag: tip
445 444 parent: 1:d32277701ccb
446 445 user: test
447 446 date: Thu Jan 01 00:00:00 1970 +0000
448 447 summary: commit on test
449 448
450 449 changeset: 1:d32277701ccb
451 450 branch: test
452 451 user: test
453 452 date: Thu Jan 01 00:00:00 1970 +0000
454 453 summary: commit on test
455 454
456 455 % log -b 2
457 456 changeset: 2:c3a4f03cc9a7
458 457 parent: 0:24427303d56f
459 458 user: test
460 459 date: Thu Jan 01 00:00:00 1970 +0000
461 460 summary: commit on default
462 461
463 462 changeset: 0:24427303d56f
464 463 user: test
465 464 date: Thu Jan 01 00:00:00 1970 +0000
466 465 summary: commit on default
467 466
@@ -1,41 +1,40 b''
1 1 adding a
2 2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 3 created new head
4 4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5 5 created new head
6 6 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7 7 % should fail because not at a head
8 8 abort: branch 'default' has 3 heads - please merge with an explicit rev
9 9 (run 'hg heads .' to see heads)
10 10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 11 % should fail because > 2 heads
12 12 abort: branch 'default' has 3 heads - please merge with an explicit rev
13 13 (run 'hg heads .' to see heads)
14 14 % should succeed
15 15 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
16 16 (branch merge, don't forget to commit)
17 17 % should succeed - 2 heads
18 18 changeset: 3:ea9ff125ff88
19 19 parent: 1:1846eede8b68
20 20 user: test
21 21 date: Thu Jan 01 00:00:00 1970 +0000
22 22 summary: d
23 23
24 24 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
25 25 (branch merge, don't forget to commit)
26 26 % should fail because at tip
27 27 abort: there is nothing to merge
28 28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 29 % should fail because 1 head
30 30 abort: there is nothing to merge - use "hg update" instead
31 31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 32 marked working directory as branch foobranch
33 created new head
34 33 % should fail because merge with other branch
35 34 abort: branch 'foobranch' has one head - please merge with an explicit rev
36 35 (run 'hg heads' to see all heads)
37 36 % merge preview not affected by common ancestor
38 37 2:2d95304fed5d
39 38 4:f25cbe84d8b3
40 39 5:a431fabd6039
41 40 6:e88e33f3bf62
@@ -1,48 +1,48 b''
1 1 % try to commit on top of a patch
2 2 abort: cannot commit over an applied mq patch
3 3 % qpop/qrefresh on the wrong revision
4 4 abort: popping would remove a revision not managed by this patch queue
5 5 using patch queue:
6 6 abort: popping would remove a revision not managed by this patch queue
7 7 abort: working directory revision is not qtip
8 8 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9 9 % qpop
10 10 abort: popping would remove a revision not managed by this patch queue
11 11 % qrefresh
12 12 abort: cannot refresh a revision with children
13 13 % tip:
14 14 3 append quux
15 15 % qpush warning branchheads
16 16 popping qp
17 17 patch queue now empty
18 18 adding a
19 19 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
20 20 marked working directory as branch b
21 21 adding c
22 created new head
23 22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
24 23 (branch merge, don't forget to commit)
24 created new head
25 25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
26 26 changeset: 2:65309210bf4e
27 27 branch: b
28 28 tag: tip
29 29 parent: 1:707adb4c8ae1
30 30 parent: 0:cb9a9f314b8b
31 31 user: test
32 32 date: Thu Jan 01 00:00:00 1970 +0000
33 33 summary: merge
34 34
35 35 changeset: 1:707adb4c8ae1
36 36 branch: b
37 37 parent: -1:000000000000
38 38 user: test
39 39 date: Thu Jan 01 00:00:00 1970 +0000
40 40 summary: c
41 41
42 42 changeset: 0:cb9a9f314b8b
43 43 user: test
44 44 date: Thu Jan 01 00:00:00 1970 +0000
45 45 summary: a
46 46
47 47 applying qp
48 48 now at: qp
@@ -1,181 +1,182 b''
1 1 marked working directory as branch foo
2 2 foo
3 3 marked working directory as branch bar
4 4 % branch shadowing
5 5 abort: a branch of the same name already exists (use 'hg update' to switch to it)
6 6 marked working directory as branch default
7 created new head
7 8 % there should be only one default branch head
8 9 changeset: 3:bf1bc2f45e83
9 10 tag: tip
10 11 user: test
11 12 date: Mon Jan 12 13:46:40 1970 +0000
12 13 summary: clear branch name
13 14
14 15 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 16 foo
16 created new head
17 17 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 18 (branch merge, don't forget to commit)
19 19 foo
20 created new head
20 21 changeset: 5:5f8fb06e083e
21 22 branch: foo
22 23 tag: tip
23 24 parent: 4:4909a3732169
24 25 parent: 3:bf1bc2f45e83
25 26 user: test
26 27 date: Mon Jan 12 13:46:40 1970 +0000
27 28 summary: merge
28 29
29 30 changeset: 4:4909a3732169
30 31 branch: foo
31 32 parent: 1:b699b1cec9c2
32 33 user: test
33 34 date: Mon Jan 12 13:46:40 1970 +0000
34 35 summary: modify a branch
35 36
36 37 changeset: 3:bf1bc2f45e83
37 38 user: test
38 39 date: Mon Jan 12 13:46:40 1970 +0000
39 40 summary: clear branch name
40 41
41 42 changeset: 2:67ec16bde7f1
42 43 branch: bar
43 44 user: test
44 45 date: Mon Jan 12 13:46:40 1970 +0000
45 46 summary: change branch name
46 47
47 48 changeset: 1:b699b1cec9c2
48 49 branch: foo
49 50 user: test
50 51 date: Mon Jan 12 13:46:40 1970 +0000
51 52 summary: add branch name
52 53
53 54 changeset: 0:be8523e69bf8
54 55 user: test
55 56 date: Mon Jan 12 13:46:40 1970 +0000
56 57 summary: initial
57 58
58 59 foo 5:5f8fb06e083e
59 60 default 3:bf1bc2f45e83 (inactive)
60 61 bar 2:67ec16bde7f1 (inactive)
61 62 foo
62 63 default
63 64 bar
64 65 % test for invalid branch cache
65 66 rolling back to revision 5 (undo commit)
66 67 changeset: 4:4909a3732169
67 68 branch: foo
68 69 tag: tip
69 70 parent: 1:b699b1cec9c2
70 71 user: test
71 72 date: Mon Jan 12 13:46:40 1970 +0000
72 73 summary: modify a branch
73 74
74 75 invalidating branch cache (tip differs)
75 76 changeset: 4:4909a3732169c0c20011c4f4b8fdff4e3d89b23f
76 77 branch: foo
77 78 tag: tip
78 79 parent: 1:b699b1cec9c2966b3700de4fef0dc123cd754c31
79 80 parent: -1:0000000000000000000000000000000000000000
80 81 manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a
81 82 user: test
82 83 date: Mon Jan 12 13:46:40 1970 +0000
83 84 files: a
84 85 extra: branch=foo
85 86 description:
86 87 modify a branch
87 88
88 89
89 90 4:4909a3732169
90 91 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4
91 92 bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default
92 93 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo
93 94 67ec16bde7f1575d523313b9bca000f6a6f12dca bar
94 95 % push should update the branch cache
95 96 % pushing just rev 0
96 97 be8523e69bf892e25817fc97187516b3c0804ae4 0
97 98 be8523e69bf892e25817fc97187516b3c0804ae4 default
98 99 % pushing everything
99 100 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4
100 101 bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default
101 102 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo
102 103 67ec16bde7f1575d523313b9bca000f6a6f12dca bar
103 104 % update with no arguments: tipmost revision of the current branch
104 105 bf1bc2f45e83
105 106 4909a3732169 (foo) tip
106 107 marked working directory as branch foobar
107 108 abort: branch foobar not found
108 109 % fastforward merge
109 110 marked working directory as branch ff
110 111 adding ff
111 112 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
112 113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 114 (branch merge, don't forget to commit)
114 115 foo
116 created new head
115 117 changeset: 6:f0c74f92a385
116 118 branch: foo
117 119 tag: tip
118 120 parent: 4:4909a3732169
119 121 parent: 5:c420d2121b71
120 122 user: test
121 123 date: Mon Jan 12 13:46:40 1970 +0000
122 124 summary: Merge ff into foo
123 125
124 126 a
125 127 ff
126 128 % test merging, add 3 default heads and one test head
127 129 adding a
128 130 adding b
129 131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
130 132 adding c
131 133 created new head
132 134 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
133 135 adding d
134 136 created new head
135 137 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
136 138 marked working directory as branch test
137 139 adding e
138 created new head
139 140 changeset: 4:3a1e01ed1df4
140 141 branch: test
141 142 tag: tip
142 143 parent: 0:cb9a9f314b8b
143 144 user: test
144 145 date: Thu Jan 01 00:00:00 1970 +0000
145 146 summary: e
146 147
147 148 changeset: 3:980f7dc84c29
148 149 parent: 0:cb9a9f314b8b
149 150 user: test
150 151 date: Thu Jan 01 00:00:00 1970 +0000
151 152 summary: d
152 153
153 154 changeset: 2:d36c0562f908
154 155 parent: 0:cb9a9f314b8b
155 156 user: test
156 157 date: Thu Jan 01 00:00:00 1970 +0000
157 158 summary: c
158 159
159 160 changeset: 1:d2ae7f538514
160 161 user: test
161 162 date: Thu Jan 01 00:00:00 1970 +0000
162 163 summary: b
163 164
164 165 changeset: 0:cb9a9f314b8b
165 166 user: test
166 167 date: Thu Jan 01 00:00:00 1970 +0000
167 168 summary: a
168 169
169 170 % implicit merge with test branch as parent
170 171 abort: branch 'test' has one head - please merge with an explicit rev
171 172 (run 'hg heads' to see all heads)
172 173 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
173 174 % implicit merge with default branch as parent
174 175 abort: branch 'default' has 3 heads - please merge with an explicit rev
175 176 (run 'hg heads .' to see heads)
176 177 % 3 branch heads, explicit merge required
177 178 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
178 179 (branch merge, don't forget to commit)
179 180 % 2 branch heads, implicit merge works
180 181 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 182 (branch merge, don't forget to commit)
@@ -1,1948 +1,1947 b''
1 1 adding a
2 2 This patch series consists of 1 patches.
3 3
4 4
5 5 Displaying [PATCH] a ...
6 6 Content-Type: text/plain; charset="us-ascii"
7 7 MIME-Version: 1.0
8 8 Content-Transfer-Encoding: 7bit
9 9 Subject: [PATCH] a
10 10 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
11 11 Message-Id: <8580ff50825a50c8f716.60@
12 12 User-Agent: Mercurial-patchbomb
13 13 Date: Thu, 01 Jan 1970 00:01:00 +0000
14 14 From: quux
15 15 To: foo
16 16 Cc: bar
17 17
18 18 # HG changeset patch
19 19 # User test
20 20 # Date 1 0
21 21 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
22 22 # Parent 0000000000000000000000000000000000000000
23 23 a
24 24
25 25 diff -r 000000000000 -r 8580ff50825a a
26 26 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27 27 +++ b/a Thu Jan 01 00:00:01 1970 +0000
28 28 @@ -0,0 +1,1 @@
29 29 +a
30 30
31 31 adding b
32 32 This patch series consists of 2 patches.
33 33
34 34
35 35 Write the introductory message for the patch series.
36 36
37 37
38 38 Displaying [PATCH 0 of 2] test ...
39 39 Content-Type: text/plain; charset="us-ascii"
40 40 MIME-Version: 1.0
41 41 Content-Transfer-Encoding: 7bit
42 42 Subject: [PATCH 0 of 2] test
43 43 Message-Id: <patchbomb.120@
44 44 User-Agent: Mercurial-patchbomb
45 45 Date: Thu, 01 Jan 1970 00:02:00 +0000
46 46 From: quux
47 47 To: foo
48 48 Cc: bar
49 49
50 50
51 51 Displaying [PATCH 1 of 2] a ...
52 52 Content-Type: text/plain; charset="us-ascii"
53 53 MIME-Version: 1.0
54 54 Content-Transfer-Encoding: 7bit
55 55 Subject: [PATCH 1 of 2] a
56 56 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
57 57 Message-Id: <8580ff50825a50c8f716.121@
58 58 In-Reply-To: <patchbomb.120@
59 59 References: <patchbomb.120@
60 60 User-Agent: Mercurial-patchbomb
61 61 Date: Thu, 01 Jan 1970 00:02:01 +0000
62 62 From: quux
63 63 To: foo
64 64 Cc: bar
65 65
66 66 # HG changeset patch
67 67 # User test
68 68 # Date 1 0
69 69 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
70 70 # Parent 0000000000000000000000000000000000000000
71 71 a
72 72
73 73 diff -r 000000000000 -r 8580ff50825a a
74 74 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
75 75 +++ b/a Thu Jan 01 00:00:01 1970 +0000
76 76 @@ -0,0 +1,1 @@
77 77 +a
78 78
79 79 Displaying [PATCH 2 of 2] b ...
80 80 Content-Type: text/plain; charset="us-ascii"
81 81 MIME-Version: 1.0
82 82 Content-Transfer-Encoding: 7bit
83 83 Subject: [PATCH 2 of 2] b
84 84 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
85 85 Message-Id: <97d72e5f12c7e84f8506.122@
86 86 In-Reply-To: <patchbomb.120@
87 87 References: <patchbomb.120@
88 88 User-Agent: Mercurial-patchbomb
89 89 Date: Thu, 01 Jan 1970 00:02:02 +0000
90 90 From: quux
91 91 To: foo
92 92 Cc: bar
93 93
94 94 # HG changeset patch
95 95 # User test
96 96 # Date 2 0
97 97 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
98 98 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
99 99 b
100 100
101 101 diff -r 8580ff50825a -r 97d72e5f12c7 b
102 102 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
103 103 +++ b/b Thu Jan 01 00:00:02 1970 +0000
104 104 @@ -0,0 +1,1 @@
105 105 +b
106 106
107 107 This patch series consists of 2 patches.
108 108
109 109
110 110 Write the introductory message for the patch series.
111 111
112 112
113 113 Writing [PATCH 0 of 2] test ...
114 114 Writing [PATCH 1 of 2] a ...
115 115 Writing [PATCH 2 of 2] b ...
116 116 adding c
117 117 % test bundle and description
118 118 searching for changes
119 119 1 changesets found
120 120
121 121 Displaying test ...
122 122 Content-Type: multipart/mixed; boundary="===
123 123 MIME-Version: 1.0
124 124 Subject: test
125 125 Message-Id: <patchbomb.180@
126 126 User-Agent: Mercurial-patchbomb
127 127 Date: Thu, 01 Jan 1970 00:03:00 +0000
128 128 From: quux
129 129 To: foo
130 130 Cc: bar
131 131
132 132 --===
133 133 Content-Type: text/plain; charset="us-ascii"
134 134 MIME-Version: 1.0
135 135 Content-Transfer-Encoding: 7bit
136 136
137 137 a multiline
138 138
139 139 description
140 140
141 141 --===
142 142 Content-Type: application/x-mercurial-bundle
143 143 MIME-Version: 1.0
144 144 Content-Disposition: attachment; filename="bundle.hg"
145 145 Content-Transfer-Encoding: base64
146 146
147 147 SEcxMEJaaDkxQVkmU1nvR7I3AAAN////lFYQWj1/4HwRkdC/AywIAk0E4pfoSIIIgQCgGEQOcLAA
148 148 2tA1VPyp4mkeoG0EaaPU0GTT1GjRiNPIg9CZGBqZ6UbU9J+KFU09DNUaGgAAAAAANAGgAAAAA1U8
149 149 oGgAADQGgAANNANAAAAAAZipFLz3XoakCEQB3PVPyHJVi1iYkAAKQAZQGpQGZESInRnCFMqLDla2
150 150 Bx3qfRQeA2N4lnzKkAmP8kR2asievLLXXebVU8Vg4iEBqcJNJAxIapSU6SM4888ZAciRG6MYAIEE
151 151 SlIBpFisgGkyRjX//TMtfcUAEsGu56+YnE1OlTZmzKm8BSu2rvo4rHAYYaadIFFuTy0LYgIkgLVD
152 152 sgVa2F19D1tx9+hgbAygLgQwaIqcDdgA4BjQgIiz/AEP72++llgDKhKducqodGE4B0ETqF3JFOFC
153 153 Q70eyNw=
154 154 --===
155 155 % utf-8 patch
156 156 adding description
157 157 adding utf
158 158 % no mime encoding for email --test
159 159 % md5sum of 8-bit output
160 160 e726c29b3008e77994c7572563e57c34 mailtest
161 161 % mime encoded mbox (base64)
162 162 This patch series consists of 1 patches.
163 163
164 164
165 165 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
166 166 From quux Thu Jan 01 00:04:01 1970
167 167 Content-Type: text/plain; charset="utf-8"
168 168 MIME-Version: 1.0
169 169 Content-Transfer-Encoding: base64
170 170 Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64
171 171 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
172 172 Message-Id: <c3c9e37db9f4fe4882cd.240@
173 173 User-Agent: Mercurial-patchbomb
174 174 Date: Thu, 01 Jan 1970 00:04:00 +0000
175 175 From: quux
176 176 To: foo
177 177 Cc: bar
178 178
179 179 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgYzNj
180 180 OWUzN2RiOWY0ZmU0ODgyY2RhMzliYWY0MmZlZDZiYWQ4YjE1YQojIFBhcmVudCAgZmYyYzlmYTIw
181 181 MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5ZgpjaGFyc2V0PXV0Zi04OyBjb250ZW50LXRy
182 182 YW5zZmVyLWVuY29kaW5nOiBiYXNlNjQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIGMzYzllMzdk
183 183 YjlmNCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
184 184 MDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
185 185 LTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5ZmEy
186 186 MDE4YiAtciBjM2M5ZTM3ZGI5ZjQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDowMDow
187 187 MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
188 188 LTAsMCArMSwxIEBACitow7ZtbWEhCg==
189 189
190 190
191 191 % mime encoded mbox (quoted-printable)
192 192 adding qp
193 193 % no mime encoding for email --test
194 194 % md5sum of qp output
195 195 0402c7d033e04044e423bb04816f9dae mailtest
196 196 % mime encoded mbox (quoted-printable)
197 197 This patch series consists of 1 patches.
198 198
199 199
200 200 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
201 201 From quux Thu Jan 01 00:04:01 1970
202 202 Content-Type: text/plain; charset="us-ascii"
203 203 MIME-Version: 1.0
204 204 Content-Transfer-Encoding: quoted-printable
205 205 Subject: [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable
206 206 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
207 207 Message-Id: <c655633f8c87700bb38c.240@
208 208 User-Agent: Mercurial-patchbomb
209 209 Date: Thu, 01 Jan 1970 00:04:00 +0000
210 210 From: quux
211 211 To: foo
212 212 Cc: bar
213 213
214 214 # HG changeset patch
215 215 # User test
216 216 # Date 4 0
217 217 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
218 218 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
219 219 charset=3Dutf-8; content-transfer-encoding: quoted-printable
220 220
221 221 diff -r c3c9e37db9f4 -r c655633f8c87 qp
222 222 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
223 223 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
224 224 @@ -0,0 +1,4 @@
225 225 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
226 226 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
227 227 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
228 228 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
229 229 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
230 230 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
231 231 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
232 232 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
233 233 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
234 234 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
235 235 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
236 236 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
237 237 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
238 238 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
239 239 +foo
240 240 +
241 241 +bar
242 242
243 243
244 244 % iso-8859-1 patch
245 245 adding isolatin
246 246 % fake ascii mbox
247 247 This patch series consists of 1 patches.
248 248
249 249
250 250 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
251 251 % md5sum of 8-bit output
252 252 9ea043d8fc43a71045114508baed144b mboxfix
253 253 % test diffstat for single patch
254 254 This patch series consists of 1 patches.
255 255
256 256 c
257 257
258 258 c | 1 +
259 259 1 files changed, 1 insertions(+), 0 deletions(-)
260 260
261 261
262 262 Displaying [PATCH] test ...
263 263 Content-Type: text/plain; charset="us-ascii"
264 264 MIME-Version: 1.0
265 265 Content-Transfer-Encoding: 7bit
266 266 Subject: [PATCH] test
267 267 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
268 268 Message-Id: <ff2c9fa2018b15fa74b3.60@
269 269 User-Agent: Mercurial-patchbomb
270 270 Date: Thu, 01 Jan 1970 00:01:00 +0000
271 271 From: quux
272 272 To: foo
273 273 Cc: bar
274 274
275 275 c | 1 +
276 276 1 files changed, 1 insertions(+), 0 deletions(-)
277 277
278 278
279 279 # HG changeset patch
280 280 # User test
281 281 # Date 3 0
282 282 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
283 283 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
284 284 c
285 285
286 286 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
287 287 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
288 288 +++ b/c Thu Jan 01 00:00:03 1970 +0000
289 289 @@ -0,0 +1,1 @@
290 290 +c
291 291
292 292 % test diffstat for multiple patches
293 293 This patch series consists of 2 patches.
294 294
295 295 a
296 296
297 297 a | 1 +
298 298 1 files changed, 1 insertions(+), 0 deletions(-)
299 299
300 300 b
301 301
302 302 b | 1 +
303 303 1 files changed, 1 insertions(+), 0 deletions(-)
304 304
305 305 Final summary:
306 306
307 307 a | 1 +
308 308 b | 1 +
309 309 2 files changed, 2 insertions(+), 0 deletions(-)
310 310
311 311
312 312 Write the introductory message for the patch series.
313 313
314 314
315 315 Displaying [PATCH 0 of 2] test ...
316 316 Content-Type: text/plain; charset="us-ascii"
317 317 MIME-Version: 1.0
318 318 Content-Transfer-Encoding: 7bit
319 319 Subject: [PATCH 0 of 2] test
320 320 Message-Id: <patchbomb.60@
321 321 User-Agent: Mercurial-patchbomb
322 322 Date: Thu, 01 Jan 1970 00:01:00 +0000
323 323 From: quux
324 324 To: foo
325 325 Cc: bar
326 326
327 327
328 328 a | 1 +
329 329 b | 1 +
330 330 2 files changed, 2 insertions(+), 0 deletions(-)
331 331
332 332 Displaying [PATCH 1 of 2] a ...
333 333 Content-Type: text/plain; charset="us-ascii"
334 334 MIME-Version: 1.0
335 335 Content-Transfer-Encoding: 7bit
336 336 Subject: [PATCH 1 of 2] a
337 337 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
338 338 Message-Id: <8580ff50825a50c8f716.61@
339 339 In-Reply-To: <patchbomb.60@
340 340 References: <patchbomb.60@
341 341 User-Agent: Mercurial-patchbomb
342 342 Date: Thu, 01 Jan 1970 00:01:01 +0000
343 343 From: quux
344 344 To: foo
345 345 Cc: bar
346 346
347 347 a | 1 +
348 348 1 files changed, 1 insertions(+), 0 deletions(-)
349 349
350 350
351 351 # HG changeset patch
352 352 # User test
353 353 # Date 1 0
354 354 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
355 355 # Parent 0000000000000000000000000000000000000000
356 356 a
357 357
358 358 diff -r 000000000000 -r 8580ff50825a a
359 359 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
360 360 +++ b/a Thu Jan 01 00:00:01 1970 +0000
361 361 @@ -0,0 +1,1 @@
362 362 +a
363 363
364 364 Displaying [PATCH 2 of 2] b ...
365 365 Content-Type: text/plain; charset="us-ascii"
366 366 MIME-Version: 1.0
367 367 Content-Transfer-Encoding: 7bit
368 368 Subject: [PATCH 2 of 2] b
369 369 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
370 370 Message-Id: <97d72e5f12c7e84f8506.62@
371 371 In-Reply-To: <patchbomb.60@
372 372 References: <patchbomb.60@
373 373 User-Agent: Mercurial-patchbomb
374 374 Date: Thu, 01 Jan 1970 00:01:02 +0000
375 375 From: quux
376 376 To: foo
377 377 Cc: bar
378 378
379 379 b | 1 +
380 380 1 files changed, 1 insertions(+), 0 deletions(-)
381 381
382 382
383 383 # HG changeset patch
384 384 # User test
385 385 # Date 2 0
386 386 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
387 387 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
388 388 b
389 389
390 390 diff -r 8580ff50825a -r 97d72e5f12c7 b
391 391 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
392 392 +++ b/b Thu Jan 01 00:00:02 1970 +0000
393 393 @@ -0,0 +1,1 @@
394 394 +b
395 395
396 396 % test inline for single patch
397 397 This patch series consists of 1 patches.
398 398
399 399
400 400 Displaying [PATCH] test ...
401 401 Content-Type: multipart/mixed; boundary="===
402 402 MIME-Version: 1.0
403 403 Subject: [PATCH] test
404 404 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
405 405 Message-Id: <ff2c9fa2018b15fa74b3.60@
406 406 User-Agent: Mercurial-patchbomb
407 407 Date: Thu, 01 Jan 1970 00:01:00 +0000
408 408 From: quux
409 409 To: foo
410 410 Cc: bar
411 411
412 412 --===
413 413 Content-Type: text/x-patch; charset="us-ascii"
414 414 MIME-Version: 1.0
415 415 Content-Transfer-Encoding: 7bit
416 416 Content-Disposition: inline; filename=t2.patch
417 417
418 418 # HG changeset patch
419 419 # User test
420 420 # Date 3 0
421 421 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
422 422 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
423 423 c
424 424
425 425 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
426 426 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
427 427 +++ b/c Thu Jan 01 00:00:03 1970 +0000
428 428 @@ -0,0 +1,1 @@
429 429 +c
430 430
431 431 --===
432 432 % test inline for single patch (quoted-printable)
433 433 This patch series consists of 1 patches.
434 434
435 435
436 436 Displaying [PATCH] test ...
437 437 Content-Type: multipart/mixed; boundary="===
438 438 MIME-Version: 1.0
439 439 Subject: [PATCH] test
440 440 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
441 441 Message-Id: <c655633f8c87700bb38c.60@
442 442 User-Agent: Mercurial-patchbomb
443 443 Date: Thu, 01 Jan 1970 00:01:00 +0000
444 444 From: quux
445 445 To: foo
446 446 Cc: bar
447 447
448 448 --===
449 449 Content-Type: text/x-patch; charset="us-ascii"
450 450 MIME-Version: 1.0
451 451 Content-Transfer-Encoding: quoted-printable
452 452 Content-Disposition: inline; filename=t2.patch
453 453
454 454 # HG changeset patch
455 455 # User test
456 456 # Date 4 0
457 457 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
458 458 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
459 459 charset=3Dutf-8; content-transfer-encoding: quoted-printable
460 460
461 461 diff -r c3c9e37db9f4 -r c655633f8c87 qp
462 462 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
463 463 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
464 464 @@ -0,0 +1,4 @@
465 465 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
466 466 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
467 467 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
468 468 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
469 469 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
470 470 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
471 471 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
472 472 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
473 473 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
474 474 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
475 475 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
476 476 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
477 477 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
478 478 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
479 479 +foo
480 480 +
481 481 +bar
482 482
483 483 --===
484 484 % test inline for multiple patches
485 485 This patch series consists of 3 patches.
486 486
487 487
488 488 Write the introductory message for the patch series.
489 489
490 490
491 491 Displaying [PATCH 0 of 3] test ...
492 492 Content-Type: text/plain; charset="us-ascii"
493 493 MIME-Version: 1.0
494 494 Content-Transfer-Encoding: 7bit
495 495 Subject: [PATCH 0 of 3] test
496 496 Message-Id: <patchbomb.60@
497 497 User-Agent: Mercurial-patchbomb
498 498 Date: Thu, 01 Jan 1970 00:01:00 +0000
499 499 From: quux
500 500 To: foo
501 501 Cc: bar
502 502
503 503
504 504 Displaying [PATCH 1 of 3] a ...
505 505 Content-Type: multipart/mixed; boundary="===
506 506 MIME-Version: 1.0
507 507 Subject: [PATCH 1 of 3] a
508 508 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
509 509 Message-Id: <8580ff50825a50c8f716.61@
510 510 In-Reply-To: <patchbomb.60@
511 511 References: <patchbomb.60@
512 512 User-Agent: Mercurial-patchbomb
513 513 Date: Thu, 01 Jan 1970 00:01:01 +0000
514 514 From: quux
515 515 To: foo
516 516 Cc: bar
517 517
518 518 --===
519 519 Content-Type: text/x-patch; charset="us-ascii"
520 520 MIME-Version: 1.0
521 521 Content-Transfer-Encoding: 7bit
522 522 Content-Disposition: inline; filename=t2-1.patch
523 523
524 524 # HG changeset patch
525 525 # User test
526 526 # Date 1 0
527 527 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
528 528 # Parent 0000000000000000000000000000000000000000
529 529 a
530 530
531 531 diff -r 000000000000 -r 8580ff50825a a
532 532 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
533 533 +++ b/a Thu Jan 01 00:00:01 1970 +0000
534 534 @@ -0,0 +1,1 @@
535 535 +a
536 536
537 537 --===
538 538 Displaying [PATCH 2 of 3] b ...
539 539 Content-Type: multipart/mixed; boundary="===
540 540 MIME-Version: 1.0
541 541 Subject: [PATCH 2 of 3] b
542 542 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
543 543 Message-Id: <97d72e5f12c7e84f8506.62@
544 544 In-Reply-To: <patchbomb.60@
545 545 References: <patchbomb.60@
546 546 User-Agent: Mercurial-patchbomb
547 547 Date: Thu, 01 Jan 1970 00:01:02 +0000
548 548 From: quux
549 549 To: foo
550 550 Cc: bar
551 551
552 552 --===
553 553 Content-Type: text/x-patch; charset="us-ascii"
554 554 MIME-Version: 1.0
555 555 Content-Transfer-Encoding: 7bit
556 556 Content-Disposition: inline; filename=t2-2.patch
557 557
558 558 # HG changeset patch
559 559 # User test
560 560 # Date 2 0
561 561 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
562 562 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
563 563 b
564 564
565 565 diff -r 8580ff50825a -r 97d72e5f12c7 b
566 566 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
567 567 +++ b/b Thu Jan 01 00:00:02 1970 +0000
568 568 @@ -0,0 +1,1 @@
569 569 +b
570 570
571 571 --===
572 572 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
573 573 Content-Type: multipart/mixed; boundary="===
574 574 MIME-Version: 1.0
575 575 Subject: [PATCH 3 of 3] charset=utf-8;
576 576 content-transfer-encoding: quoted-printable
577 577 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
578 578 Message-Id: <c655633f8c87700bb38c.63@
579 579 In-Reply-To: <patchbomb.60@
580 580 References: <patchbomb.60@
581 581 User-Agent: Mercurial-patchbomb
582 582 Date: Thu, 01 Jan 1970 00:01:03 +0000
583 583 From: quux
584 584 To: foo
585 585 Cc: bar
586 586
587 587 --===
588 588 Content-Type: text/x-patch; charset="us-ascii"
589 589 MIME-Version: 1.0
590 590 Content-Transfer-Encoding: quoted-printable
591 591 Content-Disposition: inline; filename=t2-3.patch
592 592
593 593 # HG changeset patch
594 594 # User test
595 595 # Date 4 0
596 596 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
597 597 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
598 598 charset=3Dutf-8; content-transfer-encoding: quoted-printable
599 599
600 600 diff -r c3c9e37db9f4 -r c655633f8c87 qp
601 601 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
602 602 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
603 603 @@ -0,0 +1,4 @@
604 604 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
605 605 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
606 606 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
607 607 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
608 608 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
609 609 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
610 610 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
611 611 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
612 612 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
613 613 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
614 614 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
615 615 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
616 616 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
617 617 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
618 618 +foo
619 619 +
620 620 +bar
621 621
622 622 --===
623 623 % test attach for single patch
624 624 This patch series consists of 1 patches.
625 625
626 626
627 627 Displaying [PATCH] test ...
628 628 Content-Type: multipart/mixed; boundary="===
629 629 MIME-Version: 1.0
630 630 Subject: [PATCH] test
631 631 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
632 632 Message-Id: <ff2c9fa2018b15fa74b3.60@
633 633 User-Agent: Mercurial-patchbomb
634 634 Date: Thu, 01 Jan 1970 00:01:00 +0000
635 635 From: quux
636 636 To: foo
637 637 Cc: bar
638 638
639 639 --===
640 640 Content-Type: text/plain; charset="us-ascii"
641 641 MIME-Version: 1.0
642 642 Content-Transfer-Encoding: 7bit
643 643
644 644 Patch subject is complete summary.
645 645
646 646
647 647
648 648 --===
649 649 Content-Type: text/x-patch; charset="us-ascii"
650 650 MIME-Version: 1.0
651 651 Content-Transfer-Encoding: 7bit
652 652 Content-Disposition: attachment; filename=t2.patch
653 653
654 654 # HG changeset patch
655 655 # User test
656 656 # Date 3 0
657 657 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
658 658 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
659 659 c
660 660
661 661 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
662 662 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
663 663 +++ b/c Thu Jan 01 00:00:03 1970 +0000
664 664 @@ -0,0 +1,1 @@
665 665 +c
666 666
667 667 --===
668 668 % test attach for single patch (quoted-printable)
669 669 This patch series consists of 1 patches.
670 670
671 671
672 672 Displaying [PATCH] test ...
673 673 Content-Type: multipart/mixed; boundary="===
674 674 MIME-Version: 1.0
675 675 Subject: [PATCH] test
676 676 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
677 677 Message-Id: <c655633f8c87700bb38c.60@
678 678 User-Agent: Mercurial-patchbomb
679 679 Date: Thu, 01 Jan 1970 00:01:00 +0000
680 680 From: quux
681 681 To: foo
682 682 Cc: bar
683 683
684 684 --===
685 685 Content-Type: text/plain; charset="us-ascii"
686 686 MIME-Version: 1.0
687 687 Content-Transfer-Encoding: 7bit
688 688
689 689 Patch subject is complete summary.
690 690
691 691
692 692
693 693 --===
694 694 Content-Type: text/x-patch; charset="us-ascii"
695 695 MIME-Version: 1.0
696 696 Content-Transfer-Encoding: quoted-printable
697 697 Content-Disposition: attachment; filename=t2.patch
698 698
699 699 # HG changeset patch
700 700 # User test
701 701 # Date 4 0
702 702 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
703 703 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
704 704 charset=3Dutf-8; content-transfer-encoding: quoted-printable
705 705
706 706 diff -r c3c9e37db9f4 -r c655633f8c87 qp
707 707 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
708 708 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
709 709 @@ -0,0 +1,4 @@
710 710 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
711 711 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
712 712 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
713 713 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
714 714 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
715 715 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
716 716 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
717 717 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
718 718 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
719 719 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
720 720 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
721 721 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
722 722 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
723 723 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
724 724 +foo
725 725 +
726 726 +bar
727 727
728 728 --===
729 729 % test attach for multiple patches
730 730 This patch series consists of 3 patches.
731 731
732 732
733 733 Write the introductory message for the patch series.
734 734
735 735
736 736 Displaying [PATCH 0 of 3] test ...
737 737 Content-Type: text/plain; charset="us-ascii"
738 738 MIME-Version: 1.0
739 739 Content-Transfer-Encoding: 7bit
740 740 Subject: [PATCH 0 of 3] test
741 741 Message-Id: <patchbomb.60@
742 742 User-Agent: Mercurial-patchbomb
743 743 Date: Thu, 01 Jan 1970 00:01:00 +0000
744 744 From: quux
745 745 To: foo
746 746 Cc: bar
747 747
748 748
749 749 Displaying [PATCH 1 of 3] a ...
750 750 Content-Type: multipart/mixed; boundary="===
751 751 MIME-Version: 1.0
752 752 Subject: [PATCH 1 of 3] a
753 753 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
754 754 Message-Id: <8580ff50825a50c8f716.61@
755 755 In-Reply-To: <patchbomb.60@
756 756 References: <patchbomb.60@
757 757 User-Agent: Mercurial-patchbomb
758 758 Date: Thu, 01 Jan 1970 00:01:01 +0000
759 759 From: quux
760 760 To: foo
761 761 Cc: bar
762 762
763 763 --===
764 764 Content-Type: text/plain; charset="us-ascii"
765 765 MIME-Version: 1.0
766 766 Content-Transfer-Encoding: 7bit
767 767
768 768 Patch subject is complete summary.
769 769
770 770
771 771
772 772 --===
773 773 Content-Type: text/x-patch; charset="us-ascii"
774 774 MIME-Version: 1.0
775 775 Content-Transfer-Encoding: 7bit
776 776 Content-Disposition: attachment; filename=t2-1.patch
777 777
778 778 # HG changeset patch
779 779 # User test
780 780 # Date 1 0
781 781 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
782 782 # Parent 0000000000000000000000000000000000000000
783 783 a
784 784
785 785 diff -r 000000000000 -r 8580ff50825a a
786 786 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
787 787 +++ b/a Thu Jan 01 00:00:01 1970 +0000
788 788 @@ -0,0 +1,1 @@
789 789 +a
790 790
791 791 --===
792 792 Displaying [PATCH 2 of 3] b ...
793 793 Content-Type: multipart/mixed; boundary="===
794 794 MIME-Version: 1.0
795 795 Subject: [PATCH 2 of 3] b
796 796 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
797 797 Message-Id: <97d72e5f12c7e84f8506.62@
798 798 In-Reply-To: <patchbomb.60@
799 799 References: <patchbomb.60@
800 800 User-Agent: Mercurial-patchbomb
801 801 Date: Thu, 01 Jan 1970 00:01:02 +0000
802 802 From: quux
803 803 To: foo
804 804 Cc: bar
805 805
806 806 --===
807 807 Content-Type: text/plain; charset="us-ascii"
808 808 MIME-Version: 1.0
809 809 Content-Transfer-Encoding: 7bit
810 810
811 811 Patch subject is complete summary.
812 812
813 813
814 814
815 815 --===
816 816 Content-Type: text/x-patch; charset="us-ascii"
817 817 MIME-Version: 1.0
818 818 Content-Transfer-Encoding: 7bit
819 819 Content-Disposition: attachment; filename=t2-2.patch
820 820
821 821 # HG changeset patch
822 822 # User test
823 823 # Date 2 0
824 824 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
825 825 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
826 826 b
827 827
828 828 diff -r 8580ff50825a -r 97d72e5f12c7 b
829 829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
830 830 +++ b/b Thu Jan 01 00:00:02 1970 +0000
831 831 @@ -0,0 +1,1 @@
832 832 +b
833 833
834 834 --===
835 835 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
836 836 Content-Type: multipart/mixed; boundary="===
837 837 MIME-Version: 1.0
838 838 Subject: [PATCH 3 of 3] charset=utf-8;
839 839 content-transfer-encoding: quoted-printable
840 840 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
841 841 Message-Id: <c655633f8c87700bb38c.63@
842 842 In-Reply-To: <patchbomb.60@
843 843 References: <patchbomb.60@
844 844 User-Agent: Mercurial-patchbomb
845 845 Date: Thu, 01 Jan 1970 00:01:03 +0000
846 846 From: quux
847 847 To: foo
848 848 Cc: bar
849 849
850 850 --===
851 851 Content-Type: text/plain; charset="us-ascii"
852 852 MIME-Version: 1.0
853 853 Content-Transfer-Encoding: 7bit
854 854
855 855 Patch subject is complete summary.
856 856
857 857
858 858
859 859 --===
860 860 Content-Type: text/x-patch; charset="us-ascii"
861 861 MIME-Version: 1.0
862 862 Content-Transfer-Encoding: quoted-printable
863 863 Content-Disposition: attachment; filename=t2-3.patch
864 864
865 865 # HG changeset patch
866 866 # User test
867 867 # Date 4 0
868 868 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
869 869 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
870 870 charset=3Dutf-8; content-transfer-encoding: quoted-printable
871 871
872 872 diff -r c3c9e37db9f4 -r c655633f8c87 qp
873 873 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
874 874 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
875 875 @@ -0,0 +1,4 @@
876 876 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
877 877 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
878 878 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
879 879 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
880 880 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
881 881 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
882 882 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
883 883 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
884 884 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
885 885 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
886 886 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
887 887 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
888 888 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
889 889 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
890 890 +foo
891 891 +
892 892 +bar
893 893
894 894 --===
895 895 % test intro for single patch
896 896 This patch series consists of 1 patches.
897 897
898 898
899 899 Write the introductory message for the patch series.
900 900
901 901
902 902 Displaying [PATCH 0 of 1] test ...
903 903 Content-Type: text/plain; charset="us-ascii"
904 904 MIME-Version: 1.0
905 905 Content-Transfer-Encoding: 7bit
906 906 Subject: [PATCH 0 of 1] test
907 907 Message-Id: <patchbomb.60@
908 908 User-Agent: Mercurial-patchbomb
909 909 Date: Thu, 01 Jan 1970 00:01:00 +0000
910 910 From: quux
911 911 To: foo
912 912 Cc: bar
913 913
914 914
915 915 Displaying [PATCH 1 of 1] c ...
916 916 Content-Type: text/plain; charset="us-ascii"
917 917 MIME-Version: 1.0
918 918 Content-Transfer-Encoding: 7bit
919 919 Subject: [PATCH 1 of 1] c
920 920 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
921 921 Message-Id: <ff2c9fa2018b15fa74b3.61@
922 922 In-Reply-To: <patchbomb.60@
923 923 References: <patchbomb.60@
924 924 User-Agent: Mercurial-patchbomb
925 925 Date: Thu, 01 Jan 1970 00:01:01 +0000
926 926 From: quux
927 927 To: foo
928 928 Cc: bar
929 929
930 930 # HG changeset patch
931 931 # User test
932 932 # Date 3 0
933 933 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
934 934 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
935 935 c
936 936
937 937 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
938 938 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
939 939 +++ b/c Thu Jan 01 00:00:03 1970 +0000
940 940 @@ -0,0 +1,1 @@
941 941 +c
942 942
943 943 % test --desc without --intro for a single patch
944 944 This patch series consists of 1 patches.
945 945
946 946
947 947 Displaying [PATCH 0 of 1] test ...
948 948 Content-Type: text/plain; charset="us-ascii"
949 949 MIME-Version: 1.0
950 950 Content-Transfer-Encoding: 7bit
951 951 Subject: [PATCH 0 of 1] test
952 952 Message-Id: <patchbomb.60@
953 953 User-Agent: Mercurial-patchbomb
954 954 Date: Thu, 01 Jan 1970 00:01:00 +0000
955 955 From: quux
956 956 To: foo
957 957 Cc: bar
958 958
959 959 foo
960 960
961 961 Displaying [PATCH 1 of 1] c ...
962 962 Content-Type: text/plain; charset="us-ascii"
963 963 MIME-Version: 1.0
964 964 Content-Transfer-Encoding: 7bit
965 965 Subject: [PATCH 1 of 1] c
966 966 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
967 967 Message-Id: <ff2c9fa2018b15fa74b3.61@
968 968 In-Reply-To: <patchbomb.60@
969 969 References: <patchbomb.60@
970 970 User-Agent: Mercurial-patchbomb
971 971 Date: Thu, 01 Jan 1970 00:01:01 +0000
972 972 From: quux
973 973 To: foo
974 974 Cc: bar
975 975
976 976 # HG changeset patch
977 977 # User test
978 978 # Date 3 0
979 979 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
980 980 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
981 981 c
982 982
983 983 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
984 984 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
985 985 +++ b/c Thu Jan 01 00:00:03 1970 +0000
986 986 @@ -0,0 +1,1 @@
987 987 +c
988 988
989 989 % test intro for multiple patches
990 990 This patch series consists of 2 patches.
991 991
992 992
993 993 Write the introductory message for the patch series.
994 994
995 995
996 996 Displaying [PATCH 0 of 2] test ...
997 997 Content-Type: text/plain; charset="us-ascii"
998 998 MIME-Version: 1.0
999 999 Content-Transfer-Encoding: 7bit
1000 1000 Subject: [PATCH 0 of 2] test
1001 1001 Message-Id: <patchbomb.60@
1002 1002 User-Agent: Mercurial-patchbomb
1003 1003 Date: Thu, 01 Jan 1970 00:01:00 +0000
1004 1004 From: quux
1005 1005 To: foo
1006 1006 Cc: bar
1007 1007
1008 1008
1009 1009 Displaying [PATCH 1 of 2] a ...
1010 1010 Content-Type: text/plain; charset="us-ascii"
1011 1011 MIME-Version: 1.0
1012 1012 Content-Transfer-Encoding: 7bit
1013 1013 Subject: [PATCH 1 of 2] a
1014 1014 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1015 1015 Message-Id: <8580ff50825a50c8f716.61@
1016 1016 In-Reply-To: <patchbomb.60@
1017 1017 References: <patchbomb.60@
1018 1018 User-Agent: Mercurial-patchbomb
1019 1019 Date: Thu, 01 Jan 1970 00:01:01 +0000
1020 1020 From: quux
1021 1021 To: foo
1022 1022 Cc: bar
1023 1023
1024 1024 # HG changeset patch
1025 1025 # User test
1026 1026 # Date 1 0
1027 1027 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1028 1028 # Parent 0000000000000000000000000000000000000000
1029 1029 a
1030 1030
1031 1031 diff -r 000000000000 -r 8580ff50825a a
1032 1032 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1033 1033 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1034 1034 @@ -0,0 +1,1 @@
1035 1035 +a
1036 1036
1037 1037 Displaying [PATCH 2 of 2] b ...
1038 1038 Content-Type: text/plain; charset="us-ascii"
1039 1039 MIME-Version: 1.0
1040 1040 Content-Transfer-Encoding: 7bit
1041 1041 Subject: [PATCH 2 of 2] b
1042 1042 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1043 1043 Message-Id: <97d72e5f12c7e84f8506.62@
1044 1044 In-Reply-To: <patchbomb.60@
1045 1045 References: <patchbomb.60@
1046 1046 User-Agent: Mercurial-patchbomb
1047 1047 Date: Thu, 01 Jan 1970 00:01:02 +0000
1048 1048 From: quux
1049 1049 To: foo
1050 1050 Cc: bar
1051 1051
1052 1052 # HG changeset patch
1053 1053 # User test
1054 1054 # Date 2 0
1055 1055 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1056 1056 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1057 1057 b
1058 1058
1059 1059 diff -r 8580ff50825a -r 97d72e5f12c7 b
1060 1060 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1061 1061 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1062 1062 @@ -0,0 +1,1 @@
1063 1063 +b
1064 1064
1065 1065 % test reply-to via config
1066 1066 This patch series consists of 1 patches.
1067 1067
1068 1068
1069 1069 Displaying [PATCH] test ...
1070 1070 Content-Type: text/plain; charset="us-ascii"
1071 1071 MIME-Version: 1.0
1072 1072 Content-Transfer-Encoding: 7bit
1073 1073 Subject: [PATCH] test
1074 1074 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1075 1075 Message-Id: <ff2c9fa2018b15fa74b3.60@
1076 1076 User-Agent: Mercurial-patchbomb
1077 1077 Date: Thu, 01 Jan 1970 00:01:00 +0000
1078 1078 From: quux
1079 1079 To: foo
1080 1080 Cc: bar
1081 1081 Reply-To: baz@example.com
1082 1082
1083 1083 # HG changeset patch
1084 1084 # User test
1085 1085 # Date 3 0
1086 1086 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1087 1087 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1088 1088 c
1089 1089
1090 1090 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1091 1091 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1092 1092 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1093 1093 @@ -0,0 +1,1 @@
1094 1094 +c
1095 1095
1096 1096 % test reply-to via command line
1097 1097 This patch series consists of 1 patches.
1098 1098
1099 1099
1100 1100 Displaying [PATCH] test ...
1101 1101 Content-Type: text/plain; charset="us-ascii"
1102 1102 MIME-Version: 1.0
1103 1103 Content-Transfer-Encoding: 7bit
1104 1104 Subject: [PATCH] test
1105 1105 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1106 1106 Message-Id: <ff2c9fa2018b15fa74b3.60@
1107 1107 User-Agent: Mercurial-patchbomb
1108 1108 Date: Thu, 01 Jan 1970 00:01:00 +0000
1109 1109 From: quux
1110 1110 To: foo
1111 1111 Cc: bar
1112 1112 Reply-To: baz, fred
1113 1113
1114 1114 # HG changeset patch
1115 1115 # User test
1116 1116 # Date 3 0
1117 1117 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1118 1118 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1119 1119 c
1120 1120
1121 1121 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1122 1122 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1123 1123 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1124 1124 @@ -0,0 +1,1 @@
1125 1125 +c
1126 1126
1127 1127 % tagging csets
1128 1128 % test inline for single named patch
1129 1129 This patch series consists of 1 patches.
1130 1130
1131 1131
1132 1132 Displaying [PATCH] test ...
1133 1133 Content-Type: multipart/mixed; boundary="===
1134 1134 MIME-Version: 1.0
1135 1135 Subject: [PATCH] test
1136 1136 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1137 1137 Message-Id: <ff2c9fa2018b15fa74b3.60@
1138 1138 User-Agent: Mercurial-patchbomb
1139 1139 Date: Thu, 01 Jan 1970 00:01:00 +0000
1140 1140 From: quux
1141 1141 To: foo
1142 1142 Cc: bar
1143 1143
1144 1144 --===
1145 1145 Content-Type: text/x-patch; charset="us-ascii"
1146 1146 MIME-Version: 1.0
1147 1147 Content-Transfer-Encoding: 7bit
1148 1148 Content-Disposition: inline; filename=two.diff
1149 1149
1150 1150 # HG changeset patch
1151 1151 # User test
1152 1152 # Date 3 0
1153 1153 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1154 1154 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1155 1155 c
1156 1156
1157 1157 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1158 1158 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1159 1159 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1160 1160 @@ -0,0 +1,1 @@
1161 1161 +c
1162 1162
1163 1163 --===
1164 1164 % test inline for multiple named/unnamed patches
1165 1165 This patch series consists of 2 patches.
1166 1166
1167 1167
1168 1168 Write the introductory message for the patch series.
1169 1169
1170 1170
1171 1171 Displaying [PATCH 0 of 2] test ...
1172 1172 Content-Type: text/plain; charset="us-ascii"
1173 1173 MIME-Version: 1.0
1174 1174 Content-Transfer-Encoding: 7bit
1175 1175 Subject: [PATCH 0 of 2] test
1176 1176 Message-Id: <patchbomb.60@
1177 1177 User-Agent: Mercurial-patchbomb
1178 1178 Date: Thu, 01 Jan 1970 00:01:00 +0000
1179 1179 From: quux
1180 1180 To: foo
1181 1181 Cc: bar
1182 1182
1183 1183
1184 1184 Displaying [PATCH 1 of 2] a ...
1185 1185 Content-Type: multipart/mixed; boundary="===
1186 1186 MIME-Version: 1.0
1187 1187 Subject: [PATCH 1 of 2] a
1188 1188 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1189 1189 Message-Id: <8580ff50825a50c8f716.61@
1190 1190 In-Reply-To: <patchbomb.60@
1191 1191 References: <patchbomb.60@
1192 1192 User-Agent: Mercurial-patchbomb
1193 1193 Date: Thu, 01 Jan 1970 00:01:01 +0000
1194 1194 From: quux
1195 1195 To: foo
1196 1196 Cc: bar
1197 1197
1198 1198 --===
1199 1199 Content-Type: text/x-patch; charset="us-ascii"
1200 1200 MIME-Version: 1.0
1201 1201 Content-Transfer-Encoding: 7bit
1202 1202 Content-Disposition: inline; filename=t2-1.patch
1203 1203
1204 1204 # HG changeset patch
1205 1205 # User test
1206 1206 # Date 1 0
1207 1207 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1208 1208 # Parent 0000000000000000000000000000000000000000
1209 1209 a
1210 1210
1211 1211 diff -r 000000000000 -r 8580ff50825a a
1212 1212 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1213 1213 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1214 1214 @@ -0,0 +1,1 @@
1215 1215 +a
1216 1216
1217 1217 --===
1218 1218 Displaying [PATCH 2 of 2] b ...
1219 1219 Content-Type: multipart/mixed; boundary="===
1220 1220 MIME-Version: 1.0
1221 1221 Subject: [PATCH 2 of 2] b
1222 1222 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1223 1223 Message-Id: <97d72e5f12c7e84f8506.62@
1224 1224 In-Reply-To: <patchbomb.60@
1225 1225 References: <patchbomb.60@
1226 1226 User-Agent: Mercurial-patchbomb
1227 1227 Date: Thu, 01 Jan 1970 00:01:02 +0000
1228 1228 From: quux
1229 1229 To: foo
1230 1230 Cc: bar
1231 1231
1232 1232 --===
1233 1233 Content-Type: text/x-patch; charset="us-ascii"
1234 1234 MIME-Version: 1.0
1235 1235 Content-Transfer-Encoding: 7bit
1236 1236 Content-Disposition: inline; filename=one.patch
1237 1237
1238 1238 # HG changeset patch
1239 1239 # User test
1240 1240 # Date 2 0
1241 1241 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1242 1242 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1243 1243 b
1244 1244
1245 1245 diff -r 8580ff50825a -r 97d72e5f12c7 b
1246 1246 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1247 1247 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1248 1248 @@ -0,0 +1,1 @@
1249 1249 +b
1250 1250
1251 1251 --===
1252 1252 % test inreplyto
1253 1253 This patch series consists of 1 patches.
1254 1254
1255 1255
1256 1256 Displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
1257 1257 Content-Type: text/plain; charset="us-ascii"
1258 1258 MIME-Version: 1.0
1259 1259 Content-Transfer-Encoding: 7bit
1260 1260 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
1261 1261 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
1262 1262 Message-Id: <e317db6a6f288748d1f6.60@
1263 1263 In-Reply-To: <baz>
1264 1264 References: <baz>
1265 1265 User-Agent: Mercurial-patchbomb
1266 1266 Date: Thu, 01 Jan 1970 00:01:00 +0000
1267 1267 From: quux
1268 1268 To: foo
1269 1269 Cc: bar
1270 1270
1271 1271 # HG changeset patch
1272 1272 # User test
1273 1273 # Date 0 0
1274 1274 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
1275 1275 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1276 1276 Added tag two, two.diff for changeset ff2c9fa2018b
1277 1277
1278 1278 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
1279 1279 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1280 1280 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1281 1281 @@ -2,3 +2,5 @@
1282 1282 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1283 1283 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1284 1284 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1285 1285 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1286 1286 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1287 1287
1288 1288 abort: Subject: [PATCH 0 of 2] Please enter a valid value
1289 1289 This patch series consists of 2 patches.
1290 1290
1291 1291 This patch series consists of 2 patches.
1292 1292
1293 1293
1294 1294 Write the introductory message for the patch series.
1295 1295
1296 1296
1297 1297 Displaying [PATCH 0 of 2] test ...
1298 1298 Content-Type: text/plain; charset="us-ascii"
1299 1299 MIME-Version: 1.0
1300 1300 Content-Transfer-Encoding: 7bit
1301 1301 Subject: [PATCH 0 of 2] test
1302 1302 Message-Id: <patchbomb.60@
1303 1303 In-Reply-To: <baz>
1304 1304 References: <baz>
1305 1305 User-Agent: Mercurial-patchbomb
1306 1306 Date: Thu, 01 Jan 1970 00:01:00 +0000
1307 1307 From: quux
1308 1308 To: foo
1309 1309 Cc: bar
1310 1310
1311 1311
1312 1312 Displaying [PATCH 1 of 2] a ...
1313 1313 Content-Type: text/plain; charset="us-ascii"
1314 1314 MIME-Version: 1.0
1315 1315 Content-Transfer-Encoding: 7bit
1316 1316 Subject: [PATCH 1 of 2] a
1317 1317 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1318 1318 Message-Id: <8580ff50825a50c8f716.61@
1319 1319 In-Reply-To: <patchbomb.60@
1320 1320 References: <patchbomb.60@
1321 1321 User-Agent: Mercurial-patchbomb
1322 1322 Date: Thu, 01 Jan 1970 00:01:01 +0000
1323 1323 From: quux
1324 1324 To: foo
1325 1325 Cc: bar
1326 1326
1327 1327 # HG changeset patch
1328 1328 # User test
1329 1329 # Date 1 0
1330 1330 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1331 1331 # Parent 0000000000000000000000000000000000000000
1332 1332 a
1333 1333
1334 1334 diff -r 000000000000 -r 8580ff50825a a
1335 1335 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1336 1336 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1337 1337 @@ -0,0 +1,1 @@
1338 1338 +a
1339 1339
1340 1340 Displaying [PATCH 2 of 2] b ...
1341 1341 Content-Type: text/plain; charset="us-ascii"
1342 1342 MIME-Version: 1.0
1343 1343 Content-Transfer-Encoding: 7bit
1344 1344 Subject: [PATCH 2 of 2] b
1345 1345 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1346 1346 Message-Id: <97d72e5f12c7e84f8506.62@
1347 1347 In-Reply-To: <patchbomb.60@
1348 1348 References: <patchbomb.60@
1349 1349 User-Agent: Mercurial-patchbomb
1350 1350 Date: Thu, 01 Jan 1970 00:01:02 +0000
1351 1351 From: quux
1352 1352 To: foo
1353 1353 Cc: bar
1354 1354
1355 1355 # HG changeset patch
1356 1356 # User test
1357 1357 # Date 2 0
1358 1358 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1359 1359 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1360 1360 b
1361 1361
1362 1362 diff -r 8580ff50825a -r 97d72e5f12c7 b
1363 1363 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1364 1364 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1365 1365 @@ -0,0 +1,1 @@
1366 1366 +b
1367 1367
1368 1368 % test single flag for single patch
1369 1369 This patch series consists of 1 patches.
1370 1370
1371 1371
1372 1372 Displaying [PATCH fooFlag] test ...
1373 1373 Content-Type: text/plain; charset="us-ascii"
1374 1374 MIME-Version: 1.0
1375 1375 Content-Transfer-Encoding: 7bit
1376 1376 Subject: [PATCH fooFlag] test
1377 1377 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1378 1378 Message-Id: <ff2c9fa2018b15fa74b3.60@
1379 1379 User-Agent: Mercurial-patchbomb
1380 1380 Date: Thu, 01 Jan 1970 00:01:00 +0000
1381 1381 From: quux
1382 1382 To: foo
1383 1383 Cc: bar
1384 1384
1385 1385 # HG changeset patch
1386 1386 # User test
1387 1387 # Date 3 0
1388 1388 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1389 1389 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1390 1390 c
1391 1391
1392 1392 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1393 1393 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1394 1394 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1395 1395 @@ -0,0 +1,1 @@
1396 1396 +c
1397 1397
1398 1398 % test single flag for multiple patches
1399 1399 This patch series consists of 2 patches.
1400 1400
1401 1401
1402 1402 Write the introductory message for the patch series.
1403 1403
1404 1404
1405 1405 Displaying [PATCH 0 of 2 fooFlag] test ...
1406 1406 Content-Type: text/plain; charset="us-ascii"
1407 1407 MIME-Version: 1.0
1408 1408 Content-Transfer-Encoding: 7bit
1409 1409 Subject: [PATCH 0 of 2 fooFlag] test
1410 1410 Message-Id: <patchbomb.60@
1411 1411 User-Agent: Mercurial-patchbomb
1412 1412 Date: Thu, 01 Jan 1970 00:01:00 +0000
1413 1413 From: quux
1414 1414 To: foo
1415 1415 Cc: bar
1416 1416
1417 1417
1418 1418 Displaying [PATCH 1 of 2 fooFlag] a ...
1419 1419 Content-Type: text/plain; charset="us-ascii"
1420 1420 MIME-Version: 1.0
1421 1421 Content-Transfer-Encoding: 7bit
1422 1422 Subject: [PATCH 1 of 2 fooFlag] a
1423 1423 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1424 1424 Message-Id: <8580ff50825a50c8f716.61@
1425 1425 In-Reply-To: <patchbomb.60@
1426 1426 References: <patchbomb.60@
1427 1427 User-Agent: Mercurial-patchbomb
1428 1428 Date: Thu, 01 Jan 1970 00:01:01 +0000
1429 1429 From: quux
1430 1430 To: foo
1431 1431 Cc: bar
1432 1432
1433 1433 # HG changeset patch
1434 1434 # User test
1435 1435 # Date 1 0
1436 1436 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1437 1437 # Parent 0000000000000000000000000000000000000000
1438 1438 a
1439 1439
1440 1440 diff -r 000000000000 -r 8580ff50825a a
1441 1441 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1442 1442 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1443 1443 @@ -0,0 +1,1 @@
1444 1444 +a
1445 1445
1446 1446 Displaying [PATCH 2 of 2 fooFlag] b ...
1447 1447 Content-Type: text/plain; charset="us-ascii"
1448 1448 MIME-Version: 1.0
1449 1449 Content-Transfer-Encoding: 7bit
1450 1450 Subject: [PATCH 2 of 2 fooFlag] b
1451 1451 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1452 1452 Message-Id: <97d72e5f12c7e84f8506.62@
1453 1453 In-Reply-To: <patchbomb.60@
1454 1454 References: <patchbomb.60@
1455 1455 User-Agent: Mercurial-patchbomb
1456 1456 Date: Thu, 01 Jan 1970 00:01:02 +0000
1457 1457 From: quux
1458 1458 To: foo
1459 1459 Cc: bar
1460 1460
1461 1461 # HG changeset patch
1462 1462 # User test
1463 1463 # Date 2 0
1464 1464 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1465 1465 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1466 1466 b
1467 1467
1468 1468 diff -r 8580ff50825a -r 97d72e5f12c7 b
1469 1469 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1470 1470 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1471 1471 @@ -0,0 +1,1 @@
1472 1472 +b
1473 1473
1474 1474 % test mutiple flags for single patch
1475 1475 This patch series consists of 1 patches.
1476 1476
1477 1477
1478 1478 Displaying [PATCH fooFlag barFlag] test ...
1479 1479 Content-Type: text/plain; charset="us-ascii"
1480 1480 MIME-Version: 1.0
1481 1481 Content-Transfer-Encoding: 7bit
1482 1482 Subject: [PATCH fooFlag barFlag] test
1483 1483 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1484 1484 Message-Id: <ff2c9fa2018b15fa74b3.60@
1485 1485 User-Agent: Mercurial-patchbomb
1486 1486 Date: Thu, 01 Jan 1970 00:01:00 +0000
1487 1487 From: quux
1488 1488 To: foo
1489 1489 Cc: bar
1490 1490
1491 1491 # HG changeset patch
1492 1492 # User test
1493 1493 # Date 3 0
1494 1494 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1495 1495 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1496 1496 c
1497 1497
1498 1498 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1499 1499 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1500 1500 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1501 1501 @@ -0,0 +1,1 @@
1502 1502 +c
1503 1503
1504 1504 % test multiple flags for multiple patches
1505 1505 This patch series consists of 2 patches.
1506 1506
1507 1507
1508 1508 Write the introductory message for the patch series.
1509 1509
1510 1510
1511 1511 Displaying [PATCH 0 of 2 fooFlag barFlag] test ...
1512 1512 Content-Type: text/plain; charset="us-ascii"
1513 1513 MIME-Version: 1.0
1514 1514 Content-Transfer-Encoding: 7bit
1515 1515 Subject: [PATCH 0 of 2 fooFlag barFlag] test
1516 1516 Message-Id: <patchbomb.60@
1517 1517 User-Agent: Mercurial-patchbomb
1518 1518 Date: Thu, 01 Jan 1970 00:01:00 +0000
1519 1519 From: quux
1520 1520 To: foo
1521 1521 Cc: bar
1522 1522
1523 1523
1524 1524 Displaying [PATCH 1 of 2 fooFlag barFlag] a ...
1525 1525 Content-Type: text/plain; charset="us-ascii"
1526 1526 MIME-Version: 1.0
1527 1527 Content-Transfer-Encoding: 7bit
1528 1528 Subject: [PATCH 1 of 2 fooFlag barFlag] a
1529 1529 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1530 1530 Message-Id: <8580ff50825a50c8f716.61@
1531 1531 In-Reply-To: <patchbomb.60@
1532 1532 References: <patchbomb.60@
1533 1533 User-Agent: Mercurial-patchbomb
1534 1534 Date: Thu, 01 Jan 1970 00:01:01 +0000
1535 1535 From: quux
1536 1536 To: foo
1537 1537 Cc: bar
1538 1538
1539 1539 # HG changeset patch
1540 1540 # User test
1541 1541 # Date 1 0
1542 1542 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1543 1543 # Parent 0000000000000000000000000000000000000000
1544 1544 a
1545 1545
1546 1546 diff -r 000000000000 -r 8580ff50825a a
1547 1547 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1548 1548 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1549 1549 @@ -0,0 +1,1 @@
1550 1550 +a
1551 1551
1552 1552 Displaying [PATCH 2 of 2 fooFlag barFlag] b ...
1553 1553 Content-Type: text/plain; charset="us-ascii"
1554 1554 MIME-Version: 1.0
1555 1555 Content-Transfer-Encoding: 7bit
1556 1556 Subject: [PATCH 2 of 2 fooFlag barFlag] b
1557 1557 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1558 1558 Message-Id: <97d72e5f12c7e84f8506.62@
1559 1559 In-Reply-To: <patchbomb.60@
1560 1560 References: <patchbomb.60@
1561 1561 User-Agent: Mercurial-patchbomb
1562 1562 Date: Thu, 01 Jan 1970 00:01:02 +0000
1563 1563 From: quux
1564 1564 To: foo
1565 1565 Cc: bar
1566 1566
1567 1567 # HG changeset patch
1568 1568 # User test
1569 1569 # Date 2 0
1570 1570 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1571 1571 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1572 1572 b
1573 1573
1574 1574 diff -r 8580ff50825a -r 97d72e5f12c7 b
1575 1575 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1576 1576 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1577 1577 @@ -0,0 +1,1 @@
1578 1578 +b
1579 1579
1580 1580 % test multi-address parsing
1581 1581 This patch series consists of 1 patches.
1582 1582
1583 1583
1584 1584 Writing [PATCH] test ...
1585 1585 From quux Tue Jan 01 00:01:01 1980
1586 1586 Content-Type: text/plain; charset="us-ascii"
1587 1587 MIME-Version: 1.0
1588 1588 Content-Transfer-Encoding: 7bit
1589 1589 Subject: [PATCH] test
1590 1590 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1591 1591 Message-Id: <8580ff50825a50c8f716.315532860@
1592 1592 User-Agent: Mercurial-patchbomb
1593 1593 Date: Tue, 01 Jan 1980 00:01:00 +0000
1594 1594 From: quux
1595 1595 To: spam <spam>, eggs, toast
1596 1596 Cc: foo, bar@example.com, "A, B <>" <a@example.com>
1597 1597 Bcc: "Quux, A." <quux>
1598 1598
1599 1599 # HG changeset patch
1600 1600 # User test
1601 1601 # Date 1 0
1602 1602 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1603 1603 # Parent 0000000000000000000000000000000000000000
1604 1604 a
1605 1605
1606 1606 diff -r 000000000000 -r 8580ff50825a a
1607 1607 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1608 1608 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1609 1609 @@ -0,0 +1,1 @@
1610 1610 +a
1611 1611
1612 1612
1613 1613 % test multi-byte domain parsing
1614 1614 This patch series consists of 1 patches.
1615 1615
1616 1616
1617 1617 Writing [PATCH] test ...
1618 1618 From quux Tue Jan 01 00:01:01 1980
1619 1619 Content-Type: text/plain; charset="us-ascii"
1620 1620 MIME-Version: 1.0
1621 1621 Content-Transfer-Encoding: 7bit
1622 1622 Subject: [PATCH] test
1623 1623 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1624 1624 Message-Id: <8580ff50825a50c8f716.315532860@
1625 1625 User-Agent: Mercurial-patchbomb
1626 1626 Date: Tue, 01 Jan 1980 00:01:00 +0000
1627 1627 From: quux
1628 1628 To: bar@xn--nicode-2ya.com
1629 1629
1630 1630 # HG changeset patch
1631 1631 # User test
1632 1632 # Date 1 0
1633 1633 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1634 1634 # Parent 0000000000000000000000000000000000000000
1635 1635 a
1636 1636
1637 1637 diff -r 000000000000 -r 8580ff50825a a
1638 1638 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1639 1639 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1640 1640 @@ -0,0 +1,1 @@
1641 1641 +a
1642 1642
1643 1643
1644 1644 % test outgoing
1645 1645 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
1646 1646 marked working directory as branch test
1647 created new head
1648 1647 comparing with ../t
1649 1648 searching for changes
1650 1649 This patch series consists of 8 patches.
1651 1650
1652 1651
1653 1652 Write the introductory message for the patch series.
1654 1653
1655 1654
1656 1655 Displaying [PATCH 0 of 8] test ...
1657 1656 Content-Type: text/plain; charset="us-ascii"
1658 1657 MIME-Version: 1.0
1659 1658 Content-Transfer-Encoding: 7bit
1660 1659 Subject: [PATCH 0 of 8] test
1661 1660 Message-Id: <patchbomb.315532860@
1662 1661 User-Agent: Mercurial-patchbomb
1663 1662 Date: Tue, 01 Jan 1980 00:01:00 +0000
1664 1663 From: test
1665 1664 To: foo
1666 1665
1667 1666
1668 1667 Displaying [PATCH 1 of 8] c ...
1669 1668 Content-Type: text/plain; charset="us-ascii"
1670 1669 MIME-Version: 1.0
1671 1670 Content-Transfer-Encoding: 7bit
1672 1671 Subject: [PATCH 1 of 8] c
1673 1672 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1674 1673 Message-Id: <ff2c9fa2018b15fa74b3.315532861@
1675 1674 In-Reply-To: <patchbomb.315532860@
1676 1675 References: <patchbomb.315532860@
1677 1676 User-Agent: Mercurial-patchbomb
1678 1677 Date: Tue, 01 Jan 1980 00:01:01 +0000
1679 1678 From: test
1680 1679 To: foo
1681 1680
1682 1681 # HG changeset patch
1683 1682 # User test
1684 1683 # Date 3 0
1685 1684 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1686 1685 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1687 1686 c
1688 1687
1689 1688 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1690 1689 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1691 1690 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1692 1691 @@ -0,0 +1,1 @@
1693 1692 +c
1694 1693
1695 1694 Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ...
1696 1695 Content-Type: text/plain; charset="us-ascii"
1697 1696 MIME-Version: 1.0
1698 1697 Content-Transfer-Encoding: 8bit
1699 1698 Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64
1700 1699 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1701 1700 Message-Id: <c3c9e37db9f4fe4882cd.315532862@
1702 1701 In-Reply-To: <patchbomb.315532860@
1703 1702 References: <patchbomb.315532860@
1704 1703 User-Agent: Mercurial-patchbomb
1705 1704 Date: Tue, 01 Jan 1980 00:01:02 +0000
1706 1705 From: test
1707 1706 To: foo
1708 1707
1709 1708 # HG changeset patch
1710 1709 # User test
1711 1710 # Date 4 0
1712 1711 # Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1713 1712 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
1714 1713 charset=utf-8; content-transfer-encoding: base64
1715 1714
1716 1715 diff -r ff2c9fa2018b -r c3c9e37db9f4 description
1717 1716 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1718 1717 +++ b/description Thu Jan 01 00:00:04 1970 +0000
1719 1718 @@ -0,0 +1,3 @@
1720 1719 +a multiline
1721 1720 +
1722 1721 +description
1723 1722 diff -r ff2c9fa2018b -r c3c9e37db9f4 utf
1724 1723 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1725 1724 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
1726 1725 @@ -0,0 +1,1 @@
1727 1726 +hΓΆmma!
1728 1727
1729 1728 Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
1730 1729 Content-Type: text/plain; charset="us-ascii"
1731 1730 MIME-Version: 1.0
1732 1731 Content-Transfer-Encoding: quoted-printable
1733 1732 Subject: [PATCH 3 of 8] charset=utf-8;
1734 1733 content-transfer-encoding: quoted-printable
1735 1734 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
1736 1735 Message-Id: <c655633f8c87700bb38c.315532863@
1737 1736 In-Reply-To: <patchbomb.315532860@
1738 1737 References: <patchbomb.315532860@
1739 1738 User-Agent: Mercurial-patchbomb
1740 1739 Date: Tue, 01 Jan 1980 00:01:03 +0000
1741 1740 From: test
1742 1741 To: foo
1743 1742
1744 1743 # HG changeset patch
1745 1744 # User test
1746 1745 # Date 4 0
1747 1746 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
1748 1747 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1749 1748 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1750 1749
1751 1750 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1752 1751 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1753 1752 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1754 1753 @@ -0,0 +1,4 @@
1755 1754 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1756 1755 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1757 1756 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1758 1757 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1759 1758 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1760 1759 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1761 1760 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1762 1761 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1763 1762 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1764 1763 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1765 1764 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1766 1765 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1767 1766 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1768 1767 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1769 1768 +foo
1770 1769 +
1771 1770 +bar
1772 1771
1773 1772 Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ...
1774 1773 Content-Type: text/plain; charset="us-ascii"
1775 1774 MIME-Version: 1.0
1776 1775 Content-Transfer-Encoding: 8bit
1777 1776 Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit
1778 1777 X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835
1779 1778 Message-Id: <22d0f96be12f5945fd67.315532864@
1780 1779 In-Reply-To: <patchbomb.315532860@
1781 1780 References: <patchbomb.315532860@
1782 1781 User-Agent: Mercurial-patchbomb
1783 1782 Date: Tue, 01 Jan 1980 00:01:04 +0000
1784 1783 From: test
1785 1784 To: foo
1786 1785
1787 1786 # HG changeset patch
1788 1787 # User test
1789 1788 # Date 5 0
1790 1789 # Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835
1791 1790 # Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376
1792 1791 charset=us-ascii; content-transfer-encoding: 8bit
1793 1792
1794 1793 diff -r c655633f8c87 -r 22d0f96be12f isolatin
1795 1794 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1796 1795 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
1797 1796 @@ -0,0 +1,1 @@
1798 1797 +hοΏ½mma!
1799 1798
1800 1799 Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
1801 1800 Content-Type: text/plain; charset="us-ascii"
1802 1801 MIME-Version: 1.0
1803 1802 Content-Transfer-Encoding: 7bit
1804 1803 Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
1805 1804 X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903
1806 1805 Message-Id: <dd9c2b4b8a8a0934d552.315532865@
1807 1806 In-Reply-To: <patchbomb.315532860@
1808 1807 References: <patchbomb.315532860@
1809 1808 User-Agent: Mercurial-patchbomb
1810 1809 Date: Tue, 01 Jan 1980 00:01:05 +0000
1811 1810 From: test
1812 1811 To: foo
1813 1812
1814 1813 # HG changeset patch
1815 1814 # User test
1816 1815 # Date 0 0
1817 1816 # Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903
1818 1817 # Parent 22d0f96be12f5945fd67d101af58f7bc8263c835
1819 1818 Added tag zero, zero.foo for changeset 8580ff50825a
1820 1819
1821 1820 diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags
1822 1821 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1823 1822 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1824 1823 @@ -0,0 +1,2 @@
1825 1824 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
1826 1825 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1827 1826
1828 1827 Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
1829 1828 Content-Type: text/plain; charset="us-ascii"
1830 1829 MIME-Version: 1.0
1831 1830 Content-Transfer-Encoding: 7bit
1832 1831 Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
1833 1832 X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1834 1833 Message-Id: <eae5fcf795eee29d0e45.315532866@
1835 1834 In-Reply-To: <patchbomb.315532860@
1836 1835 References: <patchbomb.315532860@
1837 1836 User-Agent: Mercurial-patchbomb
1838 1837 Date: Tue, 01 Jan 1980 00:01:06 +0000
1839 1838 From: test
1840 1839 To: foo
1841 1840
1842 1841 # HG changeset patch
1843 1842 # User test
1844 1843 # Date 0 0
1845 1844 # Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1846 1845 # Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903
1847 1846 Added tag one, one.patch for changeset 97d72e5f12c7
1848 1847
1849 1848 diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags
1850 1849 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1851 1850 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1852 1851 @@ -1,2 +1,4 @@
1853 1852 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
1854 1853 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1855 1854 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1856 1855 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1857 1856
1858 1857 Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
1859 1858 Content-Type: text/plain; charset="us-ascii"
1860 1859 MIME-Version: 1.0
1861 1860 Content-Transfer-Encoding: 7bit
1862 1861 Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
1863 1862 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
1864 1863 Message-Id: <e317db6a6f288748d1f6.315532867@
1865 1864 In-Reply-To: <patchbomb.315532860@
1866 1865 References: <patchbomb.315532860@
1867 1866 User-Agent: Mercurial-patchbomb
1868 1867 Date: Tue, 01 Jan 1980 00:01:07 +0000
1869 1868 From: test
1870 1869 To: foo
1871 1870
1872 1871 # HG changeset patch
1873 1872 # User test
1874 1873 # Date 0 0
1875 1874 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
1876 1875 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1877 1876 Added tag two, two.diff for changeset ff2c9fa2018b
1878 1877
1879 1878 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
1880 1879 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1881 1880 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1882 1881 @@ -2,3 +2,5 @@
1883 1882 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1884 1883 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1885 1884 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1886 1885 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1887 1886 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1888 1887
1889 1888 Displaying [PATCH 8 of 8] d ...
1890 1889 Content-Type: text/plain; charset="us-ascii"
1891 1890 MIME-Version: 1.0
1892 1891 Content-Transfer-Encoding: 7bit
1893 1892 Subject: [PATCH 8 of 8] d
1894 1893 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
1895 1894 Message-Id: <2f9fa9b998c5fe3ac2bd.315532868@
1896 1895 In-Reply-To: <patchbomb.315532860@
1897 1896 References: <patchbomb.315532860@
1898 1897 User-Agent: Mercurial-patchbomb
1899 1898 Date: Tue, 01 Jan 1980 00:01:08 +0000
1900 1899 From: test
1901 1900 To: foo
1902 1901
1903 1902 # HG changeset patch
1904 1903 # User test
1905 1904 # Date 4 0
1906 1905 # Branch test
1907 1906 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
1908 1907 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1909 1908 d
1910 1909
1911 1910 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
1912 1911 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1913 1912 +++ b/d Thu Jan 01 00:00:04 1970 +0000
1914 1913 @@ -0,0 +1,1 @@
1915 1914 +d
1916 1915
1917 1916 % dest#branch URIs
1918 1917 comparing with ../t
1919 1918 searching for changes
1920 1919 This patch series consists of 1 patches.
1921 1920
1922 1921
1923 1922 Displaying [PATCH] test ...
1924 1923 Content-Type: text/plain; charset="us-ascii"
1925 1924 MIME-Version: 1.0
1926 1925 Content-Transfer-Encoding: 7bit
1927 1926 Subject: [PATCH] test
1928 1927 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
1929 1928 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@
1930 1929 User-Agent: Mercurial-patchbomb
1931 1930 Date: Tue, 01 Jan 1980 00:01:00 +0000
1932 1931 From: test
1933 1932 To: foo
1934 1933
1935 1934 # HG changeset patch
1936 1935 # User test
1937 1936 # Date 4 0
1938 1937 # Branch test
1939 1938 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
1940 1939 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1941 1940 d
1942 1941
1943 1942 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
1944 1943 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1945 1944 +++ b/d Thu Jan 01 00:00:04 1970 +0000
1946 1945 @@ -0,0 +1,1 @@
1947 1946 +d
1948 1947
@@ -1,60 +1,59 b''
1 1 adding foo
2 2 marked working directory as branch branchA
3 3 pulling from ../t
4 4 requesting all changes
5 5 adding changesets
6 6 adding manifests
7 7 adding file changes
8 8 added 2 changesets with 2 changes to 1 files
9 9 (run 'hg update' to get a working copy)
10 10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 11 % create branch B
12 12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 13 marked working directory as branch branchB
14 created new head
15 14 % a new branch is there
16 15 pulling from ../t
17 16 searching for changes
18 17 adding changesets
19 18 adding manifests
20 19 adding file changes
21 20 added 2 changesets with 2 changes to 1 files (+1 heads)
22 21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 22 % develop both branch
24 23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 24 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 25 % should succeed, no new heads
27 26 pulling from ../t
28 27 searching for changes
29 28 adding changesets
30 29 adding manifests
31 30 adding file changes
32 31 added 2 changesets with 2 changes to 1 files
33 32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 33 % add an head on other branch
35 34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 36 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 37 created new head
39 38 % should succeed only one head on our branch
40 39 pulling from ../t
41 40 searching for changes
42 41 adding changesets
43 42 adding manifests
44 43 adding file changes
45 44 added 3 changesets with 3 changes to 1 files (+1 heads)
46 45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 48 created new head
50 49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 50 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
52 51 % should fail new head in our branch
53 52 pulling from ../t
54 53 searching for changes
55 54 adding changesets
56 55 adding manifests
57 56 adding file changes
58 57 added 4 changesets with 4 changes to 1 files (+1 heads)
59 58 not updating, since new heads added
60 59 (run 'hg heads' to see heads, 'hg merge' to merge)
@@ -1,310 +1,310 b''
1 1 updating to branch default
2 2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 3 pushing to ../a
4 4 searching for changes
5 5 abort: push creates new remote heads on branch 'default'!
6 6 (you should pull and merge or use push -f to force)
7 7 pulling from ../a
8 8 searching for changes
9 9 adding changesets
10 10 adding manifests
11 11 adding file changes
12 12 added 1 changesets with 1 changes to 1 files (+1 heads)
13 13 (run 'hg heads' to see heads, 'hg merge' to merge)
14 14 pushing to ../a
15 15 searching for changes
16 16 abort: push creates new remote heads on branch 'default'!
17 17 (did you forget to merge? use push -f to force)
18 18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 19 (branch merge, don't forget to commit)
20 20 pushing to ../a
21 21 searching for changes
22 22 adding changesets
23 23 adding manifests
24 24 adding file changes
25 25 added 2 changesets with 1 changes to 1 files
26 26 adding foo
27 27 updating to branch default
28 28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 30 created new head
31 31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 32 created new head
33 33 merging foo
34 34 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
35 35 (branch merge, don't forget to commit)
36 36 pushing to ../c
37 37 searching for changes
38 38 abort: push creates new remote heads on branch 'default'!
39 39 (did you forget to merge? use push -f to force)
40 40 1
41 41 pushing to ../c
42 42 searching for changes
43 43 no changes found
44 44 0
45 45 pushing to ../c
46 46 searching for changes
47 47 abort: push creates new remote heads on branch 'default'!
48 48 (did you forget to merge? use push -f to force)
49 49 1
50 50 pushing to ../c
51 51 searching for changes
52 52 abort: push creates new remote heads on branch 'default'!
53 53 (did you forget to merge? use push -f to force)
54 54 1
55 55 pushing to ../c
56 56 searching for changes
57 57 adding changesets
58 58 adding manifests
59 59 adding file changes
60 60 added 2 changesets with 2 changes to 1 files (+2 heads)
61 61 0
62 62 pushing to ../c
63 63 searching for changes
64 64 adding changesets
65 65 adding manifests
66 66 adding file changes
67 67 added 1 changesets with 1 changes to 1 files (-1 heads)
68 68 0
69 69 comparing with ../c
70 70 searching for changes
71 71 no changes found
72 72 % issue 450
73 73 pushing to ../e
74 74 searching for changes
75 75 adding changesets
76 76 adding manifests
77 77 adding file changes
78 78 added 1 changesets with 1 changes to 1 files
79 79 0
80 80 pushing to ../e
81 81 searching for changes
82 82 adding changesets
83 83 adding manifests
84 84 adding file changes
85 85 added 1 changesets with 1 changes to 1 files
86 86 0
87 87 % issue 736
88 88 % push on existing branch and new branch
89 89 pushing to ../f
90 90 searching for changes
91 91 abort: push creates new remote branches: c!
92 92 (use 'hg push -f' to force)
93 93 1
94 94 pushing to ../f
95 95 searching for changes
96 96 abort: push creates new remote branches: c!
97 97 (use 'hg push -f' to force)
98 98 1
99 99 % multiple new branches
100 100 pushing to ../f
101 101 searching for changes
102 102 abort: push creates new remote branches: c, d!
103 103 (use 'hg push -f' to force)
104 104 1
105 105 pushing to ../f
106 106 searching for changes
107 107 abort: push creates new remote branches: c, d!
108 108 (use 'hg push -f' to force)
109 109 1
110 110 % fail on multiple head push
111 111 pushing to ../f
112 112 searching for changes
113 113 abort: push creates new remote heads on branch 'a'!
114 114 (did you forget to merge? use push -f to force)
115 115 1
116 116 % push replacement head on existing branches
117 117 pushing to ../f
118 118 searching for changes
119 119 adding changesets
120 120 adding manifests
121 121 adding file changes
122 122 added 2 changesets with 2 changes to 1 files
123 123 0
124 124 % merge of branch a to other branch b followed by unrelated push on branch a
125 125 pushing to ../f
126 126 searching for changes
127 127 adding changesets
128 128 adding manifests
129 129 adding file changes
130 130 added 1 changesets with 1 changes to 1 files (-1 heads)
131 131 0
132 132 pushing to ../f
133 133 searching for changes
134 134 adding changesets
135 135 adding manifests
136 136 adding file changes
137 137 added 1 changesets with 1 changes to 1 files (+1 heads)
138 138 0
139 139 % cheating the counting algorithm
140 140 pushing to ../f
141 141 searching for changes
142 142 adding changesets
143 143 adding manifests
144 144 adding file changes
145 145 added 2 changesets with 2 changes to 1 files
146 146 0
147 147 % checking prepush logic does not allow silently pushing multiple new heads
148 148 adding init
149 149 adding a
150 150 updating to branch default
151 151 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 152 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
153 153 adding b
154 154 created new head
155 155 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
156 156 adding c
157 157 created new head
158 158 pushing to h
159 159 searching for changes
160 160 abort: push creates new remote heads on branch 'default'!
161 161 (you should pull and merge or use push -f to force)
162 162
163 163 % check prepush logic with merged branches
164 164 marked working directory as branch a
165 165 adding foo
166 166 updating to branch a
167 167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 168 marked working directory as branch b
169 169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 170 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
171 171 (branch merge, don't forget to commit)
172 created new head
172 173 pushing to j
173 174 searching for changes
174 175 abort: push creates new remote branches: b!
175 176 (use 'hg push -f' to force)
176 177
177 178 % prepush -r should not allow you to sneak in new heads
178 179 pushing to ../l
179 180 searching for changes
180 181 abort: push creates new remote heads on branch 'a'!
181 182 (did you forget to merge? use push -f to force)
182 183 % check prepush with new branch head on former topo non-head
183 184 marked working directory as branch A
184 185 adding a
185 186 marked working directory as branch B
186 187 adding b
187 188 updating to branch B
188 189 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 190 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
190 191 adding b1
191 192 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
192 193 adding a2
193 created new head
194 194 %% glog of local
195 195 @ 2: A a2
196 196 |
197 197 | o 1: B b
198 198 |/
199 199 o 0: A a
200 200
201 201 %% glog of remote
202 202 @ 2: B b1
203 203 |
204 204 o 1: B b
205 205 |
206 206 o 0: A a
207 207
208 208 %% outgoing
209 209 comparing with inner
210 210 searching for changes
211 211 2: A a2
212 212 pushing to inner
213 213 searching for changes
214 214 adding changesets
215 215 adding manifests
216 216 adding file changes
217 217 added 1 changesets with 1 changes to 1 files (+1 heads)
218 218 % check prepush with new branch head on former topo head
219 219 marked working directory as branch A
220 220 adding a
221 221 marked working directory as branch B
222 222 adding b
223 223 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
224 224 adding a1
225 created new head
226 225 updating to branch A
227 226 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 227 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
229 228 adding b1
230 229 adding a2
231 230 %% glog of local
232 231 @ 3: A a2
233 232 |
234 233 o 2: A a1
235 234 |
236 235 | o 1: B b
237 236 |/
238 237 o 0: A a
239 238
240 239 %% glog of remote
241 240 @ 3: B b1
242 241 |
243 242 | o 2: A a1
244 243 | |
245 244 o | 1: B b
246 245 |/
247 246 o 0: A a
248 247
249 248 %% outgoing
250 249 comparing with inner
251 250 searching for changes
252 251 3: A a2
253 252 pushing to inner
254 253 searching for changes
255 254 adding changesets
256 255 adding manifests
257 256 adding file changes
258 257 added 1 changesets with 1 changes to 1 files
259 258 % check prepush with new branch head and new child of former branch head
260 259 % but child is on different branch
261 260 marked working directory as branch A
262 261 adding a
263 262 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
264 263 marked working directory as branch B
265 264 adding b
266 created new head
267 265 updating to branch B
268 266 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
269 267 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
270 268 marked working directory as branch B
269 created new head
271 270 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
272 271 marked working directory as branch A
272 created new head
273 273 %% glog of local
274 274 @ 5: A b3
275 275 |
276 276 | o 4: B a3
277 277 | |
278 278 o | 3: B b1
279 279 | |
280 280 o | 2: B b0
281 281 /
282 282 o 1: A a1
283 283 |
284 284 o 0: A a0
285 285
286 286 %% glog of remote
287 287 @ 3: B b1
288 288 |
289 289 o 2: B b0
290 290
291 291 o 1: A a1
292 292 |
293 293 o 0: A a0
294 294
295 295 %% outgoing
296 296 comparing with inner
297 297 searching for changes
298 298 4: B a3
299 299 5: A b3
300 300 pushing to inner
301 301 searching for changes
302 302 abort: push creates new remote heads on branch 'A'!
303 303 (did you forget to merge? use push -f to force)
304 304 pushing to inner
305 305 searching for changes
306 306 abort: push creates new remote heads on branch 'A'!
307 307 (did you forget to merge? use push -f to force)
308 308 comparing with inner
309 309 searching for changes
310 310 no changes found
@@ -1,35 +1,34 b''
1 1 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
2 2 marked working directory as branch notdefault
3 created new head
4 3 @ 4:r1:notdefault
5 4 |
6 5 | o 3:l2:
7 6 | |
8 7 | o 2:l1:
9 8 |/
10 9 o 1:c2:
11 10 |
12 11 o 0:c1:
13 12
14 13
15 14 % Rebase a branch while preserving the branch name
16 15 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
17 16 saving bundle to
18 17 adding branch
19 18 adding changesets
20 19 adding manifests
21 20 adding file changes
22 21 added 1 changesets with 1 changes to 1 files
23 22 rebase completed
24 23 @ 4:r1:notdefault
25 24 |
26 25 o 3:l2:
27 26 |
28 27 o 2:l1:
29 28 |
30 29 o 1:c2:
31 30 |
32 31 o 0:c1:
33 32
34 33 % dirstate branch should be "notdefault"
35 34 notdefault
@@ -1,295 +1,295 b''
1 1 % first revision, no sub
2 2 adding a
3 3 % add first sub
4 4 adding a
5 5 parent: 0:f7b1eb17ad24 tip
6 6 0
7 7 branch: default
8 8 commit: 1 added, 1 subrepos
9 9 update: (current)
10 10 committing subrepository s
11 11 % add sub sub
12 12 parent: 1:7cf8cfea66e4 tip
13 13 1
14 14 branch: default
15 15 commit: 1 subrepos
16 16 update: (current)
17 17 committing subrepository s
18 18 committing subrepository s/ss
19 19 parent: 2:df30734270ae tip
20 20 2
21 21 branch: default
22 22 commit: (clean)
23 23 update: (current)
24 24 % bump sub rev
25 25 committing subrepository s
26 26 % leave sub dirty
27 27 committing subrepository s
28 28 changeset: 3:1c833a7a9e3a
29 29 tag: tip
30 30 user: test
31 31 date: Thu Jan 01 00:00:00 1970 +0000
32 32 summary: 4
33 33
34 34 % check caching
35 35 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
36 36 % restore
37 37 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 38 path s
39 39 source s
40 40 revision 1c833a7a9e3a4445c711aaf0f012379cd0d4034e
41 41 % new branch for merge tests
42 42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 43 adding t/t
44 44 % 5
45 45 committing subrepository t
46 46 created new head
47 47 % 6
48 48 committing subrepository t
49 49 path s
50 50 source s
51 51 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
52 52 path t
53 53 source t
54 54 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
55 55 % 7
56 56 committing subrepository t
57 57 % 8
58 58 % merge tests
59 59 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 61 (branch merge, don't forget to commit)
62 62 path s
63 63 source s
64 64 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
65 65 path t
66 66 source t
67 67 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
68 68 created new head
69 69 searching for copies back to rev 2
70 70 resolving manifests
71 71 overwrite None partial False
72 72 ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4
73 73 .hgsubstate: versions differ -> m
74 74 update: .hgsubstate 1/1 files (100.00%)
75 75 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
76 76 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
77 77 getting subrepo t
78 78 resolving manifests
79 79 overwrite True partial False
80 80 ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a
81 81 t: remote is newer -> g
82 82 update: t 1/1 files (100.00%)
83 83 getting t
84 84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 85 (branch merge, don't forget to commit)
86 86 path s
87 87 source s
88 88 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
89 89 path t
90 90 source t
91 91 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
92 92 committing subrepository t
93 created new head
93 94 searching for copies back to rev 2
94 95 resolving manifests
95 96 overwrite None partial False
96 97 ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf
97 98 .hgsubstate: versions differ -> m
98 99 update: .hgsubstate 1/1 files (100.00%)
99 100 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
100 101 subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
101 102 merging subrepo t
102 103 searching for copies back to rev 2
103 104 resolving manifests
104 105 overwrite None partial False
105 106 ancestor 6747d179aa9a local 20a0db6fbf6c+ remote 7af322bc1198
106 107 t: versions differ -> m
107 108 preserving t for resolve of t
108 109 update: t 1/1 files (100.00%)
109 110 picked tool 'internal:merge' for t (binary False symlink False)
110 111 merging t
111 112 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
112 113 warning: conflicts during merge.
113 114 merging t failed!
114 115 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
115 116 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
116 117 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 118 (branch merge, don't forget to commit)
118 119 % should conflict
119 120 <<<<<<< local
120 121 conflict
121 122 =======
122 123 t3
123 124 >>>>>>> other
124 125 % clone
125 126 updating to branch default
126 127 pulling subrepo s from .../sub/t/s
127 128 requesting all changes
128 129 adding changesets
129 130 adding manifests
130 131 adding file changes
131 132 added 4 changesets with 5 changes to 3 files
132 133 pulling subrepo s/ss from .../sub/t/s/ss
133 134 requesting all changes
134 135 adding changesets
135 136 adding manifests
136 137 adding file changes
137 138 added 1 changesets with 1 changes to 1 files
138 139 pulling subrepo t from .../sub/t/t
139 140 requesting all changes
140 141 adding changesets
141 142 adding manifests
142 143 adding file changes
143 144 added 4 changesets with 4 changes to 1 files (+1 heads)
144 145 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
145 146 path s
146 147 source s
147 148 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
148 149 path t
149 150 source t
150 151 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
151 152 % push
152 153 committing subrepository t
153 154 pushing ...sub/t
154 155 pushing ...sub/t/s/ss
155 156 searching for changes
156 157 no changes found
157 158 pushing ...sub/t/s
158 159 searching for changes
159 160 no changes found
160 161 pushing ...sub/t/t
161 162 searching for changes
162 163 adding changesets
163 164 adding manifests
164 165 adding file changes
165 166 added 1 changesets with 1 changes to 1 files
166 167 searching for changes
167 168 adding changesets
168 169 adding manifests
169 170 adding file changes
170 171 added 1 changesets with 1 changes to 1 files
171 172 % push -f
172 173 committing subrepository s
173 174 abort: push creates new remote heads on branch 'default'!
174 175 pushing ...sub/t
175 176 pushing ...sub/t/s/ss
176 177 searching for changes
177 178 no changes found
178 179 pushing ...sub/t/s
179 180 searching for changes
180 181 (did you forget to merge? use push -f to force)
181 182 pushing ...sub/t
182 183 pushing ...sub/t/s/ss
183 184 searching for changes
184 185 no changes found
185 186 pushing ...sub/t/s
186 187 searching for changes
187 188 adding changesets
188 189 adding manifests
189 190 adding file changes
190 191 added 1 changesets with 1 changes to 1 files (+1 heads)
191 192 pushing ...sub/t/t
192 193 searching for changes
193 194 no changes found
194 195 searching for changes
195 196 adding changesets
196 197 adding manifests
197 198 adding file changes
198 199 added 1 changesets with 1 changes to 1 files
199 200 % update
200 201 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
201 202 committing subrepository t
202 203 % pull
203 204 pulling ...sub/t
204 205 searching for changes
205 206 adding changesets
206 207 adding manifests
207 208 adding file changes
208 209 added 1 changesets with 1 changes to 1 files
209 210 (run 'hg update' to get a working copy)
210 211 pulling subrepo t from .../sub/t/t
211 212 searching for changes
212 213 adding changesets
213 214 adding manifests
214 215 adding file changes
215 216 added 1 changesets with 1 changes to 1 files
216 217 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
217 218 blah
218 219 % bogus subrepo path aborts
219 220 abort: missing ] in subrepo source
220 221 % issue 1986
221 222 adding a
222 223 marked working directory as branch br
223 224 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
224 225 adding b
225 created new head
226 226 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
227 227 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 228 (branch merge, don't forget to commit)
229 created new head
229 230 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
230 231 adding c
231 created new head
232 232 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
233 233 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
234 234 (branch merge, don't forget to commit)
235 created new head
235 236 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
236 237 adding .hgsub
237 238 committing subrepository s
238 239 marked working directory as branch br
239 240 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 241 adding b
241 242 committing subrepository s
242 243 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
243 244 adding c
244 created new head
245 245 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
246 246 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
247 247 (branch merge, don't forget to commit)
248 created new head
248 249 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
249 250 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 251 adding d
251 252 committing subrepository s
252 created new head
253 253 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
254 254 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 255 adding e
256 256 committing subrepository s
257 257 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 258 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 259 (branch merge, don't forget to commit)
260 260 % test subrepo delete from .hgsubstate
261 261 adding testdelete/nested/foo
262 262 adding testdelete/nested2/foo
263 263 adding testdelete/.hgsub
264 264 committing subrepository nested2
265 265 committing subrepository nested
266 266 nested
267 267 % test repository cloning
268 268 adding nested_absolute/foo
269 269 adding nested_relative/foo2
270 270 adding main/.hgsub
271 271 committing subrepository nested_relative
272 272 committing subrepository nested_absolute
273 273 updating to branch default
274 274 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 275 [paths]
276 276 default = $HGTMP/test-subrepo/sub/mercurial/nested_absolute
277 277 [paths]
278 278 default = $HGTMP/test-subrepo/sub/mercurial/nested_relative
279 279 % issue 1977
280 280 adding a
281 281 adding .hgsub
282 282 committing subrepository s
283 283 updating to branch default
284 284 pulling subrepo s from .../sub/repo/s
285 285 requesting all changes
286 286 adding changesets
287 287 adding manifests
288 288 adding file changes
289 289 added 1 changesets with 1 changes to 1 files
290 290 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 291 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
292 292 created new head
293 293 committing subrepository s
294 294 abort: push creates new remote heads on branch 'default'!
295 295 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now