diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 39cdc0f27..bf2256917 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -712,7 +712,10 @@ def line1(text): ''' def promptyesno(ui, msg): - return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0 + if hgversion >= "2.7": + return ui.promptchoice(msg + " $$ &yes $$ &no", 0) == 0 + else: + return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0 def promptremove(ui, repo, f): if promptyesno(ui, "hg remove %s (y/n)?" % (f,)): @@ -2636,7 +2639,7 @@ def RietveldSetup(ui, repo): rpc = None global releaseBranch - tags = repo.branchtags().keys() + tags = repo.branchmap().keys() if 'release-branch.go10' in tags: # NOTE(rsc): This tags.sort is going to get the wrong # answer when comparing release-branch.go9 with diff --git a/util/util.h b/util/util.h index fc6e01ba7..6a7b2a8e1 100644 --- a/util/util.h +++ b/util/util.h @@ -73,9 +73,13 @@ typedef unsigned int uint; typedef unsigned short ushort; // COMPILE_ASSERT causes a compile error about msg if expr is not true. +#if __cplusplus >= 201103L +#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) +#else template struct CompileAssert {}; #define COMPILE_ASSERT(expr, msg) \ typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] +#endif // DISALLOW_EVIL_CONSTRUCTORS disallows the copy and operator= functions. // It goes in the private: declarations in a class.