equal
deleted
inserted
replaced
171 execution order of tools with equal priority is unspecified. For example, you |
171 execution order of tools with equal priority is unspecified. For example, you |
172 could use the 'sort' and 'head' utilities to keep only the 10 smallest numbers |
172 could use the 'sort' and 'head' utilities to keep only the 10 smallest numbers |
173 in a text file by ensuring that 'sort' runs before 'head': |
173 in a text file by ensuring that 'sort' runs before 'head': |
174 |
174 |
175 [fix] |
175 [fix] |
176 sort:command = sort --numeric-sort |
176 sort:command = sort -n |
177 head:command = head --lines=10 |
177 head:command = head -n 10 |
178 sort:pattern = numbers.txt |
178 sort:pattern = numbers.txt |
179 head:pattern = numbers.txt |
179 head:pattern = numbers.txt |
180 sort:priority = 2 |
180 sort:priority = 2 |
181 head:priority = 1 |
181 head:priority = 1 |
182 |
182 |
1157 $ hg init priorityexample |
1157 $ hg init priorityexample |
1158 $ cd priorityexample |
1158 $ cd priorityexample |
1159 |
1159 |
1160 $ cat >> .hg/hgrc <<EOF |
1160 $ cat >> .hg/hgrc <<EOF |
1161 > [fix] |
1161 > [fix] |
1162 > head:command = head --lines=5 |
1162 > head:command = head -n 5 |
1163 > head:pattern = numbers.txt |
1163 > head:pattern = numbers.txt |
1164 > head:priority = 1 |
1164 > head:priority = 1 |
1165 > sort:command = sort --numeric-sort |
1165 > sort:command = sort -n |
1166 > sort:pattern = numbers.txt |
1166 > sort:pattern = numbers.txt |
1167 > sort:priority = 2 |
1167 > sort:priority = 2 |
1168 > EOF |
1168 > EOF |
1169 |
1169 |
1170 $ printf "8\n2\n3\n6\n7\n4\n9\n5\n1\n0\n" > numbers.txt |
1170 $ printf "8\n2\n3\n6\n7\n4\n9\n5\n1\n0\n" > numbers.txt |