Mercurial > public > mercurial-scm > hg
diff tests/test-import.t @ 15194:0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
The old code printed (with ui.status()) the changeset ID created by
patch N after committing patch N+1, e.g.
applying patch1
applying patch2
applied 1d4bd90af0e4
where 1d4bd90af0e4 is the changeset ID resulting from patch1. That's
just weird. It's also inconsistent: we only reported the changeset ID
when applying >1 patches. And it's inconsistent with 'commit', which
only tells you the new changeset ID in verbose mode. Finally, the
existing code was I18N-hostile, since it concatenated translated
strings.
The new way is to print the just-created changeset ID with ui.note()
immediately after committing it. It also clarifies what the user
message is for easier I18N.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sat, 01 Oct 2011 21:30:49 -0400 |
parents | ee574cfd0c32 |
children | 62dc0e7ab092 |
line wrap: on
line diff
--- a/tests/test-import.t Fri Oct 07 15:36:35 2011 -0500 +++ b/tests/test-import.t Sat Oct 01 21:30:49 2011 -0400 @@ -199,7 +199,6 @@ $ hg init b $ hg --cwd a export 0:tip | hg --cwd b import - applying patch from stdin - applied 80971e65b431 $ hg --cwd a id 1d4bd90af0e4 tip $ hg --cwd b id @@ -356,10 +355,15 @@ $ hg clone -qr0 a b $ hg --cwd b parents --template 'parent: {rev}\n' parent: 0 - $ hg --cwd b import ../patch1 ../patch2 + $ hg --cwd b import -v ../patch1 ../patch2 applying ../patch1 + patching file a + a + created 1d4bd90af0e4 applying ../patch2 - applied 1d4bd90af0e4 + patching file a + a + created 6d019af21222 $ hg --cwd b rollback repository tip rolled back to revision 1 (undo commit) working directory now based on revision 1 @@ -433,6 +437,7 @@ applying fuzzy-tip.patch patching file a Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines). + applied to working directory $ hg revert -a reverting a @@ -449,6 +454,7 @@ applying fuzzy-tip.patch patching file a Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines). + applied to working directory $ cd .. @@ -651,6 +657,7 @@ removing a adding b recording removal of a as rename to b (88% similar) + applied to working directory $ hg st -C A b a @@ -665,6 +672,7 @@ patching file b removing a adding b + applied to working directory $ hg st -C A b R a