[PATCH] mq:qpush and qpop with serial index
Ling, Xiaofeng
xiaofeng.ling at intel.com
Tue Sep 13 09:06:27 CDT 2005
Chris Mason <mailto:mason at suse.com> wrote:
> re.match("\d") will match any string that starts with a number. I'd
> rather see this:
Yes, I've also found this later.
> if patch and not isfile(os.path.join(self.path, patch)):
> try:
> sno = int(patch)
> except (ValueError, OverflowError):
> (error about file not found)
>
> This way if someone want a patch named 1, things will still work.
I re-created a patch, see attach file.
>> If you think it is ok, I also like to implement like hg qpush +3
>
> +3 would be nice too. While you're there, could you put this into a
> lookup function inside the queue class? That way we won't have to
> duplicate the checks in both push and pop. I wouldn't mind regex
> support on the name matching either:
>
> hg qpush reiserfs.* # push all the way up to the last patch starting
> with reiser hg qpop mm-.* # pop all the way up to the first patch
> starting with mm
>
> etc (of course, I don't expect you to code that if you don't think
> you'll use it).
I'll try to do this later.
I also got some other patches, I'll send it later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mq-list.patch
Type: application/octet-stream
Size: 2947 bytes
Desc: mq-list.patch
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050913/01c20768/mq-list.obj
More information about the Mercurial
mailing list