1354 "'hg status')\n") % len(stat[3])) |
1354 "'hg status')\n") % len(stat[3])) |
1355 else: |
1355 else: |
1356 ui.status(_("nothing changed\n")) |
1356 ui.status(_("nothing changed\n")) |
1357 return 1 |
1357 return 1 |
1358 |
1358 |
1359 ctx = repo[node] |
1359 cmdutil.commitstatus(repo, node, branch, bheads, opts) |
1360 parents = ctx.parents() |
|
1361 |
|
1362 if (not opts.get('amend') and bheads and node not in bheads and not |
|
1363 [x for x in parents if x.node() in bheads and x.branch() == branch]): |
|
1364 ui.status(_('created new head\n')) |
|
1365 # The message is not printed for initial roots. For the other |
|
1366 # changesets, it is printed in the following situations: |
|
1367 # |
|
1368 # Par column: for the 2 parents with ... |
|
1369 # N: null or no parent |
|
1370 # B: parent is on another named branch |
|
1371 # C: parent is a regular non head changeset |
|
1372 # H: parent was a branch head of the current branch |
|
1373 # Msg column: whether we print "created new head" message |
|
1374 # In the following, it is assumed that there already exists some |
|
1375 # initial branch heads of the current branch, otherwise nothing is |
|
1376 # printed anyway. |
|
1377 # |
|
1378 # Par Msg Comment |
|
1379 # N N y additional topo root |
|
1380 # |
|
1381 # B N y additional branch root |
|
1382 # C N y additional topo head |
|
1383 # H N n usual case |
|
1384 # |
|
1385 # B B y weird additional branch root |
|
1386 # C B y branch merge |
|
1387 # H B n merge with named branch |
|
1388 # |
|
1389 # C C y additional head from merge |
|
1390 # C H n merge with a head |
|
1391 # |
|
1392 # H H n head merge: head count decreases |
|
1393 |
|
1394 if not opts.get('close_branch'): |
|
1395 for r in parents: |
|
1396 if r.closesbranch() and r.branch() == branch: |
|
1397 ui.status(_('reopening closed branch head %d\n') % r) |
|
1398 |
|
1399 if ui.debugflag: |
|
1400 ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx.hex())) |
|
1401 elif ui.verbose: |
|
1402 ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx)) |
|
1403 |
1360 |
1404 @command('copy|cp', |
1361 @command('copy|cp', |
1405 [('A', 'after', None, _('record a copy that has already occurred')), |
1362 [('A', 'after', None, _('record a copy that has already occurred')), |
1406 ('f', 'force', None, _('forcibly copy over an existing managed file')), |
1363 ('f', 'force', None, _('forcibly copy over an existing managed file')), |
1407 ] + walkopts + dryrunopts, |
1364 ] + walkopts + dryrunopts, |