[PATCH 1 of 2 V3] archive: raise error.Abort if the file pattern matches no files
Angel Ezquerra
angel.ezquerra at gmail.com
Sat Apr 13 18:58:41 CDT 2013
On Apr 13, 2013 11:58 PM, "Bryan O'Sullivan" <bos at serpentine.com> wrote:
>
>
> On Sat, Apr 13, 2013 at 12:45 PM, Angel Ezquerra <angel.ezquerra at gmail.com>
wrote:
>>
>> + if total:
>> + files.sort()
>> + repo.ui.progress(_('archiving'), 0, unit=_('files'),
total=total)
>> + for i, f in enumerate(files):
>> + ff = ctx.flags(f)
>> + write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
>> + repo.ui.progress(_('archiving'), i + 1, item=f,
>> + unit=_('files'), total=total)
>> + repo.ui.progress(_('archiving'), None)
>
>
> Why don't you leave out the test of total here and leave this block
untouched.
I hesitated a bit with that. I thought that it might be a bit weird to get
a message saying "archiving 0 files" and then getting an exception saying
that "no files match the pattern".
That being said I don't feel strongly about this. I will change it as you
suggest if you think that'd be best.
Angel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130414/15c18940/attachment.html>
More information about the Mercurial-devel
mailing list