Show More
@@ -810,9 +810,14 b' class localrepository(repo.repository):' | |||||
810 | if f in ms and ms[f] == 'u': |
|
810 | if f in ms and ms[f] == 'u': | |
811 | raise util.Abort(_("unresolved merge conflicts " |
|
811 | raise util.Abort(_("unresolved merge conflicts " | |
812 | "(see hg resolve)")) |
|
812 | "(see hg resolve)")) | |
|
813 | ||||
813 | wctx = context.workingctx(self, (p1, p2), text, user, date, |
|
814 | wctx = context.workingctx(self, (p1, p2), text, user, date, | |
814 | extra, changes) |
|
815 | extra, changes) | |
815 | ret = self.commitctx(wctx, editor, True) |
|
816 | if editor: | |
|
817 | wctx._text = editor(self, wctx, | |||
|
818 | changes[1], changes[0], changes[2]) | |||
|
819 | ||||
|
820 | ret = self.commitctx(wctx, True) | |||
816 | ms.reset() |
|
821 | ms.reset() | |
817 |
|
822 | |||
818 | # update dirstate |
|
823 | # update dirstate | |
@@ -829,7 +834,7 b' class localrepository(repo.repository):' | |||||
829 | self.dirstate.invalidate() # didn't successfully commit |
|
834 | self.dirstate.invalidate() # didn't successfully commit | |
830 | wlock.release() |
|
835 | wlock.release() | |
831 |
|
836 | |||
832 |
def commitctx(self, ctx, |
|
837 | def commitctx(self, ctx, error=False): | |
833 | """Add a new revision to current repository. |
|
838 | """Add a new revision to current repository. | |
834 |
|
839 | |||
835 | Revision information is passed via the context argument. |
|
840 | Revision information is passed via the context argument. | |
@@ -870,13 +875,6 b' class localrepository(repo.repository):' | |||||
870 | else: |
|
875 | else: | |
871 | remove.append(f) |
|
876 | remove.append(f) | |
872 |
|
877 | |||
873 | updated, added = [], [] |
|
|||
874 | for f in sorted(changed): |
|
|||
875 | if f in m1 or f in m2: |
|
|||
876 | updated.append(f) |
|
|||
877 | else: |
|
|||
878 | added.append(f) |
|
|||
879 |
|
||||
880 | # update manifest |
|
878 | # update manifest | |
881 | m1.update(new) |
|
879 | m1.update(new) | |
882 | removed = [f for f in sorted(remove) if f in m1 or f in m2] |
|
880 | removed = [f for f in sorted(remove) if f in m1 or f in m2] | |
@@ -890,9 +888,6 b' class localrepository(repo.repository):' | |||||
890 | p2.manifestnode(), (new, removed1)) |
|
888 | p2.manifestnode(), (new, removed1)) | |
891 |
|
889 | |||
892 | text = ctx.description() |
|
890 | text = ctx.description() | |
893 | if editor: |
|
|||
894 | text = editor(self, ctx, added, updated, removed) |
|
|||
895 |
|
||||
896 | lines = [line.rstrip() for line in text.rstrip().splitlines()] |
|
891 | lines = [line.rstrip() for line in text.rstrip().splitlines()] | |
897 | while lines and not lines[0]: |
|
892 | while lines and not lines[0]: | |
898 | del lines[0] |
|
893 | del lines[0] |
@@ -1,6 +1,4 b'' | |||||
1 | % commit date test |
|
1 | % commit date test | |
2 | transaction abort! |
|
|||
3 | rollback completed |
|
|||
4 | abort: empty commit message |
|
2 | abort: empty commit message | |
5 | abort: impossible time zone offset: 4444444 |
|
3 | abort: impossible time zone offset: 4444444 | |
6 | abort: invalid date: '1\t15.1' |
|
4 | abort: invalid date: '1\t15.1' | |
@@ -116,6 +114,4 b" HG: branch 'default'" | |||||
116 | HG: added added |
|
114 | HG: added added | |
117 | HG: changed changed |
|
115 | HG: changed changed | |
118 | HG: removed removed |
|
116 | HG: removed removed | |
119 | transaction abort! |
|
|||
120 | rollback completed |
|
|||
121 | abort: empty commit message |
|
117 | abort: empty commit message |
@@ -32,8 +32,6 b' added 1 changesets with 2 changes to 2 f' | |||||
32 | updating working directory |
|
32 | updating working directory | |
33 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | applying ../tip.patch |
|
34 | applying ../tip.patch | |
35 | transaction abort! |
|
|||
36 | rollback completed |
|
|||
37 | abort: empty commit message |
|
35 | abort: empty commit message | |
38 | % import of plain diff should be ok with message |
|
36 | % import of plain diff should be ok with message | |
39 | requesting all changes |
|
37 | requesting all changes | |
@@ -150,8 +148,6 b' added 1 changesets with 2 changes to 2 f' | |||||
150 | updating working directory |
|
148 | updating working directory | |
151 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
152 | applying patch from stdin |
|
150 | applying patch from stdin | |
153 | transaction abort! |
|
|||
154 | rollback completed |
|
|||
155 | abort: empty commit message |
|
151 | abort: empty commit message | |
156 | % hg export in email, should use patch header |
|
152 | % hg export in email, should use patch header | |
157 | requesting all changes |
|
153 | requesting all changes |
@@ -112,10 +112,6 b' A a' | |||||
112 | A b |
|
112 | A b | |
113 | % default keyword expansion including commit hook |
|
113 | % default keyword expansion including commit hook | |
114 | % interrupted commit should not change state or run commit hook |
|
114 | % interrupted commit should not change state or run commit hook | |
115 | a |
|
|||
116 | b |
|
|||
117 | transaction abort! |
|
|||
118 | rollback completed |
|
|||
119 | abort: empty commit message |
|
115 | abort: empty commit message | |
120 | % status |
|
116 | % status | |
121 | A a |
|
117 | A a | |
@@ -281,8 +277,6 b' xxx $' | |||||
281 | ignore $Id$ |
|
277 | ignore $Id$ | |
282 | a |
|
278 | a | |
283 | % interrupted commit should not change state |
|
279 | % interrupted commit should not change state | |
284 | transaction abort! |
|
|||
285 | rollback completed |
|
|||
286 | abort: empty commit message |
|
280 | abort: empty commit message | |
287 | % status |
|
281 | % status | |
288 | M a |
|
282 | M a |
@@ -53,9 +53,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
53 | % select files but no hunks |
|
53 | % select files but no hunks | |
54 | diff --git a/empty-rw b/empty-rw |
|
54 | diff --git a/empty-rw b/empty-rw | |
55 | new file mode 100644 |
|
55 | new file mode 100644 | |
56 |
examine changes to 'empty-rw'? [Ynsfdaq?] |
|
56 | examine changes to 'empty-rw'? [Ynsfdaq?] abort: empty commit message | |
57 | rollback completed |
|
|||
58 | abort: empty commit message |
|
|||
59 |
|
57 | |||
60 | changeset: -1:000000000000 |
|
58 | changeset: -1:000000000000 | |
61 | tag: tip |
|
59 | tag: tip |
General Comments 0
You need to be logged in to leave comments.
Login now