Show More
@@ -818,6 +818,7 b' def tryimportone(ui, repo, hunk, parents' | |||
|
818 | 818 | msg = _('applied to working directory') |
|
819 | 819 | |
|
820 | 820 | rejects = False |
|
821 | dsguard = None | |
|
821 | 822 | |
|
822 | 823 | try: |
|
823 | 824 | cmdline_message = logmessage(ui, opts) |
@@ -859,7 +860,7 b' def tryimportone(ui, repo, hunk, parents' | |||
|
859 | 860 | |
|
860 | 861 | n = None |
|
861 | 862 | if update: |
|
862 | repo.dirstate.beginparentchange() | |
|
863 | dsguard = dirstateguard(repo, 'tryimportone') | |
|
863 | 864 | if p1 != parents[0]: |
|
864 | 865 | updatefunc(repo, p1.node()) |
|
865 | 866 | if p2 != parents[1]: |
@@ -899,7 +900,7 b' def tryimportone(ui, repo, hunk, parents' | |||
|
899 | 900 | n = repo.commit(message, opts.get('user') or user, |
|
900 | 901 | opts.get('date') or date, match=m, |
|
901 | 902 | editor=editor, force=partial) |
|
902 | repo.dirstate.endparentchange() | |
|
903 | dsguard.close() | |
|
903 | 904 | else: |
|
904 | 905 | if opts.get('exact') or opts.get('import_branch'): |
|
905 | 906 | branch = branch or 'default' |
@@ -937,6 +938,7 b' def tryimportone(ui, repo, hunk, parents' | |||
|
937 | 938 | msg = _('created %s') % short(n) |
|
938 | 939 | return (msg, n, rejects) |
|
939 | 940 | finally: |
|
941 | lockmod.release(dsguard) | |
|
940 | 942 | os.unlink(tmpname) |
|
941 | 943 | |
|
942 | 944 | def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False, |
General Comments 0
You need to be logged in to leave comments.
Login now