##// END OF EJS Templates
mercurial: expose function to check for unresolved files
marcink -
r798:a5646341 default
parent child
Show More
@@ -22,7 +22,7 import urllib
22 import urllib2
22 import urllib2
23 import traceback
23 import traceback
24
24
25 from hgext import largefiles, rebase
25 from hgext import largefiles, rebase, purge
26 from hgext.strip import strip as hgext_strip
26 from hgext.strip import strip as hgext_strip
27 from mercurial import commands
27 from mercurial import commands
28 from mercurial import unionrepo
28 from mercurial import unionrepo
@@ -896,6 +896,23 class HgRemote(RemoteBase):
896 repo.baseui, repo, ctx.node(), update=update, backup=backup)
896 repo.baseui, repo, ctx.node(), update=update, backup=backup)
897
897
898 @reraise_safe_exceptions
898 @reraise_safe_exceptions
899 def get_unresolved_files(self, wire):
900 repo = self._factory.repo(wire)
901
902 log.debug('Calculating unresolved files for repo: %s', repo)
903 output = io.BytesIO()
904
905 def write(data, **unused_kwargs):
906 output.write(data)
907
908 baseui = self._factory._create_config(wire['config'])
909 baseui.write = write
910
911 commands.resolve(baseui, repo, list=True)
912 unresolved = output.getvalue().splitlines(0)
913 return unresolved
914
915 @reraise_safe_exceptions
899 def merge(self, wire, revision):
916 def merge(self, wire, revision):
900 repo = self._factory.repo(wire)
917 repo = self._factory.repo(wire)
901 baseui = self._factory._create_config(wire['config'])
918 baseui = self._factory._create_config(wire['config'])
@@ -933,8 +950,12 class HgRemote(RemoteBase):
933 repo = self._factory.repo(wire)
950 repo = self._factory.repo(wire)
934 baseui = self._factory._create_config(wire['config'])
951 baseui = self._factory._create_config(wire['config'])
935 repo.ui.setconfig('ui', 'merge', 'internal:dump')
952 repo.ui.setconfig('ui', 'merge', 'internal:dump')
936 rebase.rebase(
953 # In case of sub repositories are used mercurial prompts the user in
937 baseui, repo, base=source, dest=dest, abort=abort, keep=not abort)
954 # case of merge conflicts or different sub repository sources. By
955 # setting the interactive flag to `False` mercurial doesn't prompt the
956 # used but instead uses a default value.
957 repo.ui.setconfig('ui', 'interactive', False)
958 rebase.rebase(baseui, repo, base=source, dest=dest, abort=abort, keep=not abort)
938
959
939 @reraise_safe_exceptions
960 @reraise_safe_exceptions
940 def tag(self, wire, name, revision, message, local, user, tag_time, tag_timezone):
961 def tag(self, wire, name, revision, message, local, user, tag_time, tag_timezone):
General Comments 0
You need to be logged in to leave comments. Login now