[PATCH] patchbomb: Encode overly long lines

Rocco Rutte pdmef at gmx.net
Thu May 7 10:53:18 CDT 2009


# HG changeset patch
# User Rocco Rutte <pdmef at gmx.net>
# Date 1241711034 -7200
# Node ID 09fb4ed3b1e1fd6bf28ca090654f2e83d7d040b5
# Parent  db52cc4f2f97e6a125d2f71363230357c0100570
patchbomb: Encode overly long lines

A limit of 998 byte + CRLF is mandated by RfC2822.

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -6,7 +6,7 @@
 # GNU General Public License version 2, incorporated herein by reference.
 
 from i18n import _
-import os, smtplib, socket
+import os, smtplib, socket, quopri
 import email.Header, email.MIMEText, email.Utils
 import util, encoding
 
@@ -88,14 +88,37 @@ def validateconfig(ui):
 
 def mimetextpatch(s, subtype='plain', display=False):
     '''If patch in utf-8 transfer-encode it.'''
+
+    def encode_qp(str):
+        for line in str.split('\n'):
+            if len(line) > 998:
+                return quopri.encodestring(str), "quoted-printable"
+        return str, None
+
+    passed = False
     if not display:
         for cs in ('us-ascii', 'utf-8'):
             try:
                 s.decode(cs)
-                return email.MIMEText.MIMEText(s, subtype, cs)
+                s, enc = encode_qp(s)
+                passed = True
+                msg = email.MIMEText.MIMEText(s, subtype, cs)
+                if enc is not None:
+                    del msg['Content-Transfer-Encoding']
+                    msg['Content-Transfer-Encoding'] = enc
+                return msg
             except UnicodeDecodeError:
                 pass
-    return email.MIMEText.MIMEText(s, subtype)
+
+    if passed:
+        return email.MIMEText.MIMEText(s, subtype)
+
+    s, enc = encode_qp(s)
+    msg = email.MIMEText.MIMEText(s, subtype)
+    if enc is not None:
+        del msg['Content-Transfer-Encoding']
+        msg['Content-Transfer-Encoding'] = enc
+    return msg
 
 def _charsets(ui):
     '''Obtains charsets to send mail parts not containing patches.'''
diff --git a/tests/test-patchbomb b/tests/test-patchbomb
--- a/tests/test-patchbomb
+++ b/tests/test-patchbomb
@@ -58,7 +58,23 @@ echo "% md5sum of 8-bit output"
 $TESTDIR/md5sum.py mailtest
 rm mailtest
 
-echo "% mime encoded mbox"
+echo "% mime encoded mbox (base64)"
+hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
+cat mbox | fixheaders
+rm mbox
+
+echo "% mime encoded mbox (quoted-printable)"
+python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % \
+  ("x" * 1024)); fp.close();'
+hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: quoted-printable'
+
+echo "% no mime encoding for email --test"
+hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
+echo "% md5sum of qp output"
+$TESTDIR/md5sum.py mailtest
+rm mailtest
+
+echo "% mime encoded mbox (quoted-printable)"
 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
 cat mbox | fixheaders
 rm mbox
@@ -85,17 +101,25 @@ echo "% test inline for single patch"
 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \
   fixheaders
 
+echo "% test inline for single patch (quoted-printable)"
+hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 4 | \
+  fixheaders
+
 echo "% test inline for multiple patches"
-hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \
-  fixheaders
+hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
+  -r 0:1 -r 4 | fixheaders
 
 echo "% test attach for single patch"
 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 2 | \
   fixheaders
 
+echo "% test attach for single patch (quoted-printable)"
+hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 4 | \
+  fixheaders
+
 echo "% test attach for multiple patches"
-hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 0:1 | \
-  fixheaders
+hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
+  -r 0:1 -r 4 | fixheaders
 
 echo "% test intro for single patch"
 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test 2 | \
diff --git a/tests/test-patchbomb.out b/tests/test-patchbomb.out
--- a/tests/test-patchbomb.out
+++ b/tests/test-patchbomb.out
@@ -158,7 +158,7 @@ adding utf
 % no mime encoding for email --test
 % md5sum of 8-bit output
 e726c29b3008e77994c7572563e57c34  mailtest
-% mime encoded mbox
+% mime encoded mbox (base64)
 This patch series consists of 1 patches.
 
 
@@ -188,6 +188,59 @@ MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFu
 LTAsMCArMSwxIEBACitow7ZtbWEhCg==
 
 
+% mime encoded mbox (quoted-printable)
+adding qp
+% no mime encoding for email --test
+% md5sum of qp output
+0402c7d033e04044e423bb04816f9dae  mailtest
+% mime encoded mbox (quoted-printable)
+This patch series consists of 1 patches.
+
+
+Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
+From quux Thu Jan 01 00:04:01 1970
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Subject: [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable
+X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+Message-Id: <c655633f8c87700bb38c.240@
+User-Agent: Mercurial-patchbomb
+Date: Thu, 01 Jan 1970 00:04:00 +0000
+From: quux
+To: foo
+Cc: bar
+
+# HG changeset patch
+# User test
+# Date 4 0
+# Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+# Parent  c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+charset=3Dutf-8; content-transfer-encoding: quoted-printable
+
+diff -r c3c9e37db9f4 -r c655633f8c87 qp
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/qp	Thu Jan 01 00:00:04 1970 +0000
+@@ -0,0 +1,4 @@
++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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
 % fake ascii mbox
@@ -196,7 +249,7 @@ This patch series consists of 1 patches.
 
 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
 % md5sum of 8-bit output
-40190791e367a851e42f0887b2d9439e  mboxfix
+9ea043d8fc43a71045114508baed144b  mboxfix
 % test diffstat for single patch
 This patch series consists of 1 patches.
 
@@ -376,18 +429,70 @@ diff -r 97d72e5f12c7 -r ff2c9fa2018b c
 +c
 
 --===
+% test inline for single patch (quoted-printable)
+This patch series consists of 1 patches.
+
+
+Displaying [PATCH] test ...
+Content-Type: multipart/mixed; boundary="===
+MIME-Version: 1.0
+Subject: [PATCH] test
+X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+Message-Id: <c655633f8c87700bb38c.60@
+User-Agent: Mercurial-patchbomb
+Date: Thu, 01 Jan 1970 00:01:00 +0000
+From: quux
+To: foo
+Cc: bar
+
+--===
+Content-Type: text/x-patch; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: inline; filename=t2.patch
+
+# HG changeset patch
+# User test
+# Date 4 0
+# Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+# Parent  c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+charset=3Dutf-8; content-transfer-encoding: quoted-printable
+
+diff -r c3c9e37db9f4 -r c655633f8c87 qp
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/qp	Thu Jan 01 00:00:04 1970 +0000
+@@ -0,0 +1,4 @@
++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
++foo
++
++bar
+
+--===
 % test inline for multiple patches
-This patch series consists of 2 patches.
+This patch series consists of 3 patches.
 
 
 Write the introductory message for the patch series.
 
 
-Displaying [PATCH 0 of 2] test ...
+Displaying [PATCH 0 of 3] test ...
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
-Subject: [PATCH 0 of 2] test
+Subject: [PATCH 0 of 3] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
 Date: Thu, 01 Jan 1970 00:01:00 +0000
@@ -396,10 +501,10 @@ To: foo
 Cc: bar
 
 
-Displaying [PATCH 1 of 2] a ...
+Displaying [PATCH 1 of 3] a ...
 Content-Type: multipart/mixed; boundary="===
 MIME-Version: 1.0
-Subject: [PATCH 1 of 2] a
+Subject: [PATCH 1 of 3] a
 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
 Message-Id: <8580ff50825a50c8f716.61@
 In-Reply-To: <patchbomb.60@
@@ -430,10 +535,10 @@ diff -r 000000000000 -r 8580ff50825a a
 +a
 
 --===
-Displaying [PATCH 2 of 2] b ...
+Displaying [PATCH 2 of 3] b ...
 Content-Type: multipart/mixed; boundary="===
 MIME-Version: 1.0
-Subject: [PATCH 2 of 2] b
+Subject: [PATCH 2 of 3] b
 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
 Message-Id: <97d72e5f12c7e84f8506.62@
 In-Reply-To: <patchbomb.60@
@@ -464,6 +569,57 @@ diff -r 8580ff50825a -r 97d72e5f12c7 b
 +b
 
 --===
+Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
+Content-Type: multipart/mixed; boundary="===
+MIME-Version: 1.0
+Subject: [PATCH 3 of 3] charset=utf-8;
+	content-transfer-encoding: quoted-printable
+X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+Message-Id: <c655633f8c87700bb38c.63@
+In-Reply-To: <patchbomb.60@
+References: <patchbomb.60@
+User-Agent: Mercurial-patchbomb
+Date: Thu, 01 Jan 1970 00:01:03 +0000
+From: quux
+To: foo
+Cc: bar
+
+--===
+Content-Type: text/x-patch; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: inline; filename=t2-3.patch
+
+# HG changeset patch
+# User test
+# Date 4 0
+# Node ID c655633f8c87700bb38cc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xxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
++foo
++
++bar
+
+--===
 % test attach for single patch
 This patch series consists of 1 patches.
 
@@ -509,18 +665,79 @@ diff -r 97d72e5f12c7 -r ff2c9fa2018b c
 +c
 
 --===
+% test attach for single patch (quoted-printable)
+This patch series consists of 1 patches.
+
+
+Displaying [PATCH] test ...
+Content-Type: multipart/mixed; boundary="===
+MIME-Version: 1.0
+Subject: [PATCH] test
+X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+Message-Id: <c655633f8c87700bb38c.60@
+User-Agent: Mercurial-patchbomb
+Date: Thu, 01 Jan 1970 00:01:00 +0000
+From: quux
+To: foo
+Cc: bar
+
+--===
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+
+Patch subject is complete summary.
+
+
+
+--===
+Content-Type: text/x-patch; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=t2.patch
+
+# HG changeset patch
+# User test
+# Date 4 0
+# Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+# Parent  c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+charset=3Dutf-8; content-transfer-encoding: quoted-printable
+
+diff -r c3c9e37db9f4 -r c655633f8c87 qp
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/qp	Thu Jan 01 00:00:04 1970 +0000
+@@ -0,0 +1,4 @@
++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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ches
-This patch series consists of 2 patches.
+This patch series consists of 3 patches.
 
 
 Write the introductory message for the patch series.
 
 
-Displaying [PATCH 0 of 2] test ...
+Displaying [PATCH 0 of 3] test ...
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
-Subject: [PATCH 0 of 2] test
+Subject: [PATCH 0 of 3] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
 Date: Thu, 01 Jan 1970 00:01:00 +0000
@@ -529,10 +746,10 @@ To: foo
 Cc: bar
 
 
-Displaying [PATCH 1 of 2] a ...
+Displaying [PATCH 1 of 3] a ...
 Content-Type: multipart/mixed; boundary="===
 MIME-Version: 1.0
-Subject: [PATCH 1 of 2] a
+Subject: [PATCH 1 of 3] a
 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
 Message-Id: <8580ff50825a50c8f716.61@
 In-Reply-To: <patchbomb.60@
@@ -572,10 +789,10 @@ diff -r 000000000000 -r 8580ff50825a a
 +a
 
 --===
-Displaying [PATCH 2 of 2] b ...
+Displaying [PATCH 2 of 3] b ...
 Content-Type: multipart/mixed; boundary="===
 MIME-Version: 1.0
-Subject: [PATCH 2 of 2] b
+Subject: [PATCH 2 of 3] b
 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
 Message-Id: <97d72e5f12c7e84f8506.62@
 In-Reply-To: <patchbomb.60@
@@ -615,6 +832,66 @@ diff -r 8580ff50825a -r 97d72e5f12c7 b
 +b
 
 --===
+Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
+Content-Type: multipart/mixed; boundary="===
+MIME-Version: 1.0
+Subject: [PATCH 3 of 3] charset=utf-8;
+	content-transfer-encoding: quoted-printable
+X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+Message-Id: <c655633f8c87700bb38c.63@
+In-Reply-To: <patchbomb.60@
+References: <patchbomb.60@
+User-Agent: Mercurial-patchbomb
+Date: Thu, 01 Jan 1970 00:01:03 +0000
+From: quux
+To: foo
+Cc: bar
+
+--===
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+
+Patch subject is complete summary.
+
+
+
+--===
+Content-Type: text/x-patch; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=t2-3.patch
+
+# HG changeset patch
+# User test
+# Date 4 0
+# Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+# Parent  c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+charset=3Dutf-8; content-transfer-encoding: quoted-printable
+
+diff -r c3c9e37db9f4 -r c655633f8c87 qp
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/qp	Thu Jan 01 00:00:04 1970 +0000
+@@ -0,0 +1,4 @@
++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
++foo
++
++bar
+
+--===
 % test intro for single patch
 This patch series consists of 1 patches.
 
@@ -873,8 +1150,8 @@ Content-Type: text/plain; charset="us-as
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
-X-Mercurial-Node: 2c502b2db30e1ddd5e4ecabd68d9002f6c77a5a3
-Message-Id: <2c502b2db30e1ddd5e4e.60@
+X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
+Message-Id: <e317db6a6f288748d1f6.60@
 In-Reply-To: baz
 References: baz
 User-Agent: Mercurial-patchbomb
@@ -886,11 +1163,11 @@ Cc: bar
 # HG changeset patch
 # User test
 # Date 0 0
-# Node ID 2c502b2db30e1ddd5e4ecabd68d9002f6c77a5a3
-# Parent  91c0d1bdb4bc9cfd3b38a53a5ec53e9ae412a275
+# Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
+# Parent  eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
 Added tag two, two.diff for changeset ff2c9fa2018b
 
-diff -r 91c0d1bdb4bc -r 2c502b2db30e .hgtags
+diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
 --- a/.hgtags	Thu Jan 01 00:00:00 1970 +0000
 +++ b/.hgtags	Thu Jan 01 00:00:00 1970 +0000
 @@ -2,3 +2,5 @@


More information about the Mercurial-devel mailing list