Re: 'pu' branch for StGIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2007-08-08 18:18:34 -0400, Pavel Roskin wrote:

> On Wed, 2007-08-08 at 23:39 +0200, Karl Hasselström wrote:
>
> > I can't reproduce.
>
> OK, it's trickier. There are some bad patch names that don't get
> imported properly. In particular, patches ending with ".diff" are
> committed after import.

Ah, sneaky. And it turns out to be not a problem with import, but a
problem with dots in patch names. It's just that import is the only
place those are typically created.

It was all due to a sloppy regexp. This is the fix:

diff --git a/stgit/stack.py b/stgit/stack.py
index 4186ba9..c403f51 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -391,11 +391,11 @@ def read_refs(branch):
     given branch. The patches are listed by name; the branch head is
     None."""
     refs = {}
-    patchpat = re.compile(r'^refs/patches/%s/([^\.]+)$' % branch)
+    patchpat = re.compile(r'^refs/patches/%s/(.+)$' % branch)
     for line in git._output_lines('git-show-ref'):
         sha1, ref = line.split()
         m = re.match(patchpat, ref)
-        if m:
+        if m and not m.group(1).endswith('.log'):
             refs[m.group(1)] = sha1
         elif ref == 'refs/heads/%s' % branch:
             refs[None] = sha1

Thanks for taking the time to track this down -- with the detailed
symptoms you gave, I found it in no time. I've pushed an updated
series (as well as the other patches I've posted tonight) to
git://repo.or.cz/stgit/kha.git.

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux