[PATCH 1 of 7] avoid naive plural tricks
Martin Geisler
mg at daimi.au.dk
Fri Aug 22 15:16:11 UTC 2008
# HG changeset patch
# User Martin Geisler <mg at daimi.au.dk>
# Date 1219415582 -7200
# Node ID 3bfdb29c19995acf3bcd06a9e8c13cf661d3a46d
# Parent 2300f6d2d707ccdba6da0f030c7316933d2138b0
avoid naive plural tricks
diff -r 2300f6d2d707 -r 3bfdb29c1999 mercurial/patch.py
--- a/mercurial/patch.py Fri Aug 22 16:33:02 2008 +0200
+++ b/mercurial/patch.py Fri Aug 22 16:33:02 2008 +0200
@@ -376,15 +376,11 @@
if not self.rej:
return
- if self.hunks != 1:
- hunkstr = "s"
- else:
- hunkstr = ""
fname = self.fname + ".rej"
self.ui.warn(
- _("%d out of %d hunk%s FAILED -- saving rejects to file %s\n") %
- (len(self.rej), self.hunks, hunkstr, fname))
+ _("%d out of %d hunk(s) FAILED -- saving rejects to file %s\n") %
+ (len(self.rej), self.hunks, fname))
try: os.unlink(fname)
except:
pass
diff -r 2300f6d2d707 -r 3bfdb29c1999 tests/test-mq-missingfiles.out
--- a/tests/test-mq-missingfiles.out Fri Aug 22 16:33:02 2008 +0200
+++ b/tests/test-mq-missingfiles.out Fri Aug 22 16:33:02 2008 +0200
@@ -3,7 +3,7 @@
% push patch with missing target
applying changeb
unable to find 'b' for patching
-2 out of 2 hunks FAILED -- saving rejects to file b.rej
+2 out of 2 hunk(s) FAILED -- saving rejects to file b.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Errors during apply, please fix and refresh changeb
@@ -30,7 +30,7 @@
% push git patch with missing target
applying changeb
unable to find 'b' for patching
-1 out of 1 hunk FAILED -- saving rejects to file b.rej
+1 out of 1 hunk(s) FAILED -- saving rejects to file b.rej
patch failed, unable to continue (try -v)
b: No such file or directory
b not tracked!
diff -r 2300f6d2d707 -r 3bfdb29c1999 tests/test-transplant.out
--- a/tests/test-transplant.out Fri Aug 22 16:33:02 2008 +0200
+++ b/tests/test-transplant.out Fri Aug 22 16:33:02 2008 +0200
@@ -110,14 +110,14 @@
applying a1e30dd1b8e7
patching file foo
Hunk #1 FAILED at 0
-1 out of 1 hunk FAILED -- saving rejects to file foo.rej
+1 out of 1 hunk(s) FAILED -- saving rejects to file foo.rej
patch failed to apply
abort: Fix up the merge and run hg transplant --continue
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
applying a1e30dd1b8e7
patching file foo
Hunk #1 FAILED at 0
-1 out of 1 hunk FAILED -- saving rejects to file foo.rej
+1 out of 1 hunk(s) FAILED -- saving rejects to file foo.rej
patch failed to apply
abort: Fix up the merge and run hg transplant --continue
a1e30dd1b8e7 transplanted as f1563cf27039
More information about the Mercurial-devel
mailing list