Commits

Patrick Mézard committed f82a108

Import patch groups in chronological order

  • Participants
  • Parent commits fa8dc72

Comments (0)

Files changed (7)

 def importpatches(ui, repo, groups):
     imported = []
     q = repo.mq
-    for patches in groups[::-1]:
+    for patches in groups:
         for p in patches[::-1]:
             name = makepatchname(q.series, p.title)
             importpatch(ui, repo, name, p.msg)

File test-mbox.out

 % test with no mbox specified
 abort: no mailbox path configured
 % test --mbox option
-[PATCH] patch1
+[PATCH] patch2
 import this group? [Nydq?]  abort: user quit
 % test default behaviour, help and quit
-[PATCH] patch1
+[PATCH] patch2
 import this group? [Nydq?]  n - skip this patch group
 y - qimport this patch group
 d - done, import selected patches and quit
 ? - display help
 
 import this group? [Nydq?]  
-[PATCH] patch2
+[PATCH] patch1
 import this group? [Nydq?]  abort: user quit
 % test no answer
+[PATCH] patch2
+import this group? [Nydq?]  
 [PATCH] patch1
 import this group? [Nydq?]  
-[PATCH] patch2
-import this group? [Nydq?]  
 0 patches imported
 % mimport everything
+[PATCH] patch2
+import this group? [Nydq?]  
 [PATCH] patch1
 import this group? [Nydq?]  
-[PATCH] patch2
-import this group? [Nydq?]  
 adding patch2 to series file
 adding patch1 to series file
 2 patches imported
 MIME-Version: 1.0
 Subject: [PATCH] patch1
 Message-Id: <5ab3c4562bd574dbd782.1230599538@localhost>
-Date: Tue, 30 Dec 2008 03:12:18 +0100
+Date: Tue, 29 Dec 2008 03:12:18 +0100
 From: Bar Baz <barbaz@gmail.com>
 To: mercurial-devel@selenic.com
 Content-Type: text/plain; charset="us-ascii"

File tests/msg2.1

 Received: by 10.114.108.3 with SMTP id g3cs509927wac;
         Mon, 29 Dec 2008 17:14:30 -0800 (PST)
 MIME-Version: 1.0
-Subject: [PATCH 1 of 2] header
+Subject: [PATCH 1 of 2] patch 1 of 2
 Message-Id: <1ab3c4562bd574dbd782.1230599538@localhost>
 Date: Tue, 16 Dec 2008 02:12:18 +0100
 From: Bar Baz <barbaz@gmail.com>

File tests/msg2.2

 Received: by 10.114.108.3 with SMTP id g3cs509927wac;
         Mon, 29 Dec 2008 17:15:30 -0800 (PST)
 MIME-Version: 1.0
-Subject: [PATCH 2 of 2] header
+Subject: [PATCH 2 of 2] patch 2 of 2
 Message-Id: <2ab3c4562bd574dbd782.1230599538@localhost>
 Date: Tue, 16 Dec 2008 02:12:18 +0100
 From: Bar Baz <barbaz@gmail.com>

File tests/msg2.3

 Received: by 10.114.108.3 with SMTP id g3cs509927wac;
         Mon, 29 Dec 2008 17:15:30 -0800 (PST)
 MIME-Version: 1.0
-Subject: [PATCH 2 of 2] header
+Subject: [PATCH 2 of 2] patch 2 of 2, single
 Message-Id: <3ab3c4562bd574dbd782.1230599538@localhost>
 Date: Tue, 16 Dec 2008 02:12:18 +0100
 From: Foo Baz <foo@gmail.com>

File tests/test.mbx

-From MAILER-DAEMON Sat Jan  3 10:45:19 2009
+From MAILER-DAEMON Sun Jan 18 12:40:56 2009
 Delivered-To: foobar@gmail.com
 Received: by 10.114.108.3 with SMTP id g3cs509927wac;
         Mon, 29 Dec 2008 17:13:30 -0800 (PST)
 Mercurial-devel mailing list
 Mercurial-devel@selenic.com
 http://selenic.com/mailman/listinfo/mercurial-devel
-From MAILER-DAEMON Sat Jan  3 10:45:19 2009
+From MAILER-DAEMON Sun Jan 18 12:40:56 2009
 Delivered-To: foobar@gmail.com
 Received: by 10.114.108.3 with SMTP id g3cs509927wac;
         Mon, 29 Dec 2008 17:13:30 -0800 (PST)
 MIME-Version: 1.0
 Subject: [PATCH] patch1
 Message-Id: <5ab3c4562bd574dbd782.1230599538@localhost>
-Date: Tue, 30 Dec 2008 03:12:18 +0100
+Date: Tue, 29 Dec 2008 03:12:18 +0100
 From: Bar Baz <barbaz@gmail.com>
 To: mercurial-devel@selenic.com
 Content-Type: text/plain; charset="us-ascii"
 Mercurial-devel mailing list
 Mercurial-devel@selenic.com
 http://selenic.com/mailman/listinfo/mercurial-devel
-From MAILER-DAEMON Sat Jan  3 10:45:19 2009
+From MAILER-DAEMON Sun Jan 18 12:40:56 2009
 Delivered-To: foobar@gmail.com
 Received: by 10.114.108.3 with SMTP id g3cs509927wac;
         Mon, 29 Dec 2008 17:13:30 -0800 (PST)