Mercurial > hg
view contrib/chg/util.h @ 28607:a88959ae5938
remove: queue warnings until after status messages (issue5140) (API)
Before this change, warnings were interspersed with (and easily drowned out by)
status messages.
API:
abstractsubrepo.removefiles has an extra argument warnings,
into which callees should append their warnings.
Note: Callees should not assume that there will be items in the list,
today, I'm lazily including any other subrepos warnings, but
that may change.
cmdutil.remove has an extra optional argument warnings,
into which it will place warnings.
If warnings is omitted, warnings will be reported via ui.warn()
as before this change (albeit, after any status messages).
author | timeless <timeless@mozdev.org> |
---|---|
date | Thu, 17 Mar 2016 18:19:36 +0000 |
parents | d4d8a3c89e6d |
children | ea86cdcd9b50 |
line wrap: on
line source
/* * Utility functions * * Copyright (c) 2011 Yuya Nishihara <yuya@tcha.org> * * This software may be used and distributed according to the terms of the * GNU General Public License version 2 or any later version. */ #ifndef UTIL_H_ #define UTIL_H_ #ifdef __GNUC__ #define PRINTF_FORMAT_ __attribute__((format(printf, 1, 2))) #else #define PRINTF_FORMAT_ #endif void abortmsg(const char *fmt, ...) PRINTF_FORMAT_; void enabledebugmsg(void); void debugmsg(const char *fmt, ...) PRINTF_FORMAT_; void *mallocx(size_t size); void *reallocx(void *ptr, size_t size); int runshellcmd(const char *cmd, const char *envp[], const char *cwd); #endif /* UTIL_H_ */