Show More
@@ -169,6 +169,9 b' class ui(object):' | |||||
169 | if self.plain('alias'): |
|
169 | if self.plain('alias'): | |
170 | for k, v in cfg.items('alias'): |
|
170 | for k, v in cfg.items('alias'): | |
171 | del cfg['alias'][k] |
|
171 | del cfg['alias'][k] | |
|
172 | if self.plain('revsetalias'): | |||
|
173 | for k, v in cfg.items('revsetalias'): | |||
|
174 | del cfg['revsetalias'][k] | |||
172 |
|
175 | |||
173 | if trusted: |
|
176 | if trusted: | |
174 | self._tcfg.update(cfg) |
|
177 | self._tcfg.update(cfg) |
@@ -1049,6 +1049,8 b' aliases:' | |||||
1049 |
|
1049 | |||
1050 | $ echo '[revsetalias]' >> .hg/hgrc |
|
1050 | $ echo '[revsetalias]' >> .hg/hgrc | |
1051 | $ echo 'm = merge()' >> .hg/hgrc |
|
1051 | $ echo 'm = merge()' >> .hg/hgrc | |
|
1052 | (revset aliases can override builtin revsets) | |||
|
1053 | $ echo 'p2($1) = p1($1)' >> .hg/hgrc | |||
1052 | $ echo 'sincem = descendants(m)' >> .hg/hgrc |
|
1054 | $ echo 'sincem = descendants(m)' >> .hg/hgrc | |
1053 | $ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc |
|
1055 | $ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc | |
1054 | $ echo 'rs(ARG1, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc |
|
1056 | $ echo 'rs(ARG1, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc | |
@@ -1064,6 +1066,58 b' aliases:' | |||||
1064 | <fullreposet+ 0:9>> |
|
1066 | <fullreposet+ 0:9>> | |
1065 | 6 |
|
1067 | 6 | |
1066 |
|
1068 | |||
|
1069 | $ HGPLAIN=1 try m | |||
|
1070 | ('symbol', 'm') | |||
|
1071 | abort: unknown revision 'm'! | |||
|
1072 | [255] | |||
|
1073 | ||||
|
1074 | $ HGPLAIN=1 HGPLAINEXCEPT=revsetalias try m | |||
|
1075 | ('symbol', 'm') | |||
|
1076 | (func | |||
|
1077 | ('symbol', 'merge') | |||
|
1078 | None) | |||
|
1079 | * set: | |||
|
1080 | <filteredset | |||
|
1081 | <fullreposet+ 0:9>> | |||
|
1082 | 6 | |||
|
1083 | ||||
|
1084 | (for some reason HGPLAIN and HGPLAINEXCEPT can carry forward) | |||
|
1085 | ||||
|
1086 | $ unset HGPLAIN | |||
|
1087 | $ unset HGPLAINEXCEPT | |||
|
1088 | ||||
|
1089 | $ try 'p2(.)' | |||
|
1090 | (func | |||
|
1091 | ('symbol', 'p2') | |||
|
1092 | ('symbol', '.')) | |||
|
1093 | (func | |||
|
1094 | ('symbol', 'p1') | |||
|
1095 | ('symbol', '.')) | |||
|
1096 | * set: | |||
|
1097 | <baseset+ [8]> | |||
|
1098 | 8 | |||
|
1099 | ||||
|
1100 | $ HGPLAIN=1 try 'p2(.)' | |||
|
1101 | (func | |||
|
1102 | ('symbol', 'p2') | |||
|
1103 | ('symbol', '.')) | |||
|
1104 | * set: | |||
|
1105 | <baseset+ []> | |||
|
1106 | ||||
|
1107 | $ HGPLAIN=1 HGPLAINEXCEPT=revsetalias try 'p2(.)' | |||
|
1108 | (func | |||
|
1109 | ('symbol', 'p2') | |||
|
1110 | ('symbol', '.')) | |||
|
1111 | (func | |||
|
1112 | ('symbol', 'p1') | |||
|
1113 | ('symbol', '.')) | |||
|
1114 | * set: | |||
|
1115 | <baseset+ [8]> | |||
|
1116 | 8 | |||
|
1117 | ||||
|
1118 | $ unset HGPLAIN | |||
|
1119 | $ unset HGPLAINEXCEPT | |||
|
1120 | ||||
1067 | test alias recursion |
|
1121 | test alias recursion | |
1068 |
|
1122 | |||
1069 | $ try sincem |
|
1123 | $ try sincem |
General Comments 0
You need to be logged in to leave comments.
Login now