##// END OF EJS Templates
update: introduce --tool for controlling the merge tool...
Mads Kiilerich -
r21552:61151f42 default
parent child Browse files
Show More
@@ -5797,9 +5797,11 b' def unbundle(ui, repo, fname1, *fnames, '
5797 ('c', 'check', None,
5797 ('c', 'check', None,
5798 _('update across branches if no uncommitted changes')),
5798 _('update across branches if no uncommitted changes')),
5799 ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
5799 ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
5800 ('r', 'rev', '', _('revision'), _('REV'))],
5800 ('r', 'rev', '', _('revision'), _('REV'))
5801 ] + mergetoolopts,
5801 _('[-c] [-C] [-d DATE] [[-r] REV]'))
5802 _('[-c] [-C] [-d DATE] [[-r] REV]'))
5802 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False):
5803 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False,
5804 tool=None):
5803 """update working directory (or switch revisions)
5805 """update working directory (or switch revisions)
5804
5806
5805 Update the repository's working directory to the specified
5807 Update the repository's working directory to the specified
@@ -5880,6 +5882,8 b' def update(ui, repo, node=None, rev=None'
5880 rev = repo[repo[None].branch()].rev()
5882 rev = repo[repo[None].branch()].rev()
5881 mergemod._checkunknown(repo, repo[None], repo[rev])
5883 mergemod._checkunknown(repo, repo[None], repo[rev])
5882
5884
5885 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
5886
5883 if clean:
5887 if clean:
5884 ret = hg.clean(repo, rev)
5888 ret = hg.clean(repo, rev)
5885 else:
5889 else:
@@ -212,7 +212,7 b' Show all commands + options'
212 serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate
212 serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate
213 status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos
213 status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos
214 summary: remote
214 summary: remote
215 update: clean, check, date, rev
215 update: clean, check, date, rev, tool
216 addremove: similarity, include, exclude, dry-run
216 addremove: similarity, include, exclude, dry-run
217 archive: no-decode, prefix, rev, type, subrepos, include, exclude
217 archive: no-decode, prefix, rev, type, subrepos, include, exclude
218 backout: merge, parent, rev, tool, include, exclude, message, logfile, date, user
218 backout: merge, parent, rev, tool, include, exclude, message, logfile, date, user
@@ -587,6 +587,54 b' HGMERGE specifies internal:other but is '
587
587
588 $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
588 $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
589
589
590 update is a merge ...
591
592 $ beforemerge
593 [merge-tools]
594 false.whatever=
595 true.priority=1
596 true.executable=cat
597 # hg update -C 1
598 $ hg debugsetparent 0
599 $ hg update -r 2
600 merging f
601 revision 1
602 space
603 revision 0
604 space
605 revision 2
606 space
607 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
608 $ aftermerge
609 # cat f
610 revision 1
611 space
612 # hg stat
613 M f
614
615 update should also have --tool
616
617 $ beforemerge
618 [merge-tools]
619 false.whatever=
620 true.priority=1
621 true.executable=cat
622 # hg update -C 1
623 $ hg debugsetparent 0
624 $ hg update -r 2 --tool false
625 merging f
626 merging f failed!
627 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
628 use 'hg resolve' to retry unresolved file merges
629 [1]
630 $ aftermerge
631 # cat f
632 revision 1
633 space
634 # hg stat
635 M f
636 ? f.orig
637
590 Default is silent simplemerge:
638 Default is silent simplemerge:
591
639
592 $ beforemerge
640 $ beforemerge
General Comments 0
You need to be logged in to leave comments. Login now