Mercurial > evolve
comparison hgext3rd/topic/__init__.py @ 2691:9b68a2083dac
topic: drop the message about running evolve after topic change
Topic change is no longer creating a mess that needs cleaning.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 02 Jul 2017 13:49:32 +0200 |
parents | 5156a67f66a6 |
children | a7b7471b4bed |
comparison
equal
deleted
inserted
replaced
2690:5d839e1f0ce9 | 2691:9b68a2083dac |
---|---|
338 if repo.vfs.exists('topic'): | 338 if repo.vfs.exists('topic'): |
339 repo.vfs.unlink('topic') | 339 repo.vfs.unlink('topic') |
340 | 340 |
341 def _changetopics(ui, repo, revset, newtopic): | 341 def _changetopics(ui, repo, revset, newtopic): |
342 rewrote = 0 | 342 rewrote = 0 |
343 needevolve = False | |
344 wl = l = txn = None | 343 wl = l = txn = None |
345 try: | 344 try: |
346 wl = repo.wlock() | 345 wl = repo.wlock() |
347 l = repo.lock() | 346 l = repo.lock() |
348 txn = repo.transaction('rewrite-topics') | 347 txn = repo.transaction('rewrite-topics') |
390 c.files(), filectxfn, | 389 c.files(), filectxfn, |
391 user=c.user(), date=c.date(), extra=fixedextra) | 390 user=c.user(), date=c.date(), extra=fixedextra) |
392 newnode = repo.commitctx(mc) | 391 newnode = repo.commitctx(mc) |
393 successors[c.node()] = newnode | 392 successors[c.node()] = newnode |
394 ui.debug('new node id is %s\n' % node.hex(newnode)) | 393 ui.debug('new node id is %s\n' % node.hex(newnode)) |
395 needevolve = needevolve or (len(c.children()) > 0) | |
396 obsolete.createmarkers(repo, [(c, (repo[newnode],))]) | 394 obsolete.createmarkers(repo, [(c, (repo[newnode],))]) |
397 rewrote += 1 | 395 rewrote += 1 |
398 # move the working copy too | 396 # move the working copy too |
399 wctx = repo[None] | 397 wctx = repo[None] |
400 # in-progress merge is a bit too complex for now. | 398 # in-progress merge is a bit too complex for now. |
405 txn.close() | 403 txn.close() |
406 finally: | 404 finally: |
407 lock.release(txn, l, wl) | 405 lock.release(txn, l, wl) |
408 repo.invalidate() | 406 repo.invalidate() |
409 ui.status('changed topic on %d changes\n' % rewrote) | 407 ui.status('changed topic on %d changes\n' % rewrote) |
410 if needevolve: | |
411 evolvetarget = 'topic(%s)' % newtopic if newtopic else 'not topic()' | |
412 ui.status('please run hg evolve --rev "%s" now\n' % evolvetarget) | |
413 | 408 |
414 def _listtopics(ui, repo, opts): | 409 def _listtopics(ui, repo, opts): |
415 fm = ui.formatter('topics', opts) | 410 fm = ui.formatter('topics', opts) |
416 activetopic = repo.currenttopic | 411 activetopic = repo.currenttopic |
417 namemask = '%s' | 412 namemask = '%s' |