annotate tests/heredoctest.py @ 19954:427ce5633c1c stable

largefiles: don't prompt for normal/largefile changes when doing plain updates We used to get like: $ hg up -r 2 foo has been turned into a normal file keep as (l)argefile or use (n)ormal file? l getting changed largefiles 0 largefiles updated, 0 removed 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ cat foo cat: foo: No such file or directory [1] - which both asked the wrong question and did the wrong thing. Instead, skip this conflict resolution when the local conflicting file has been scheduled for removal and there thus is no conflict.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 25 Oct 2013 02:33:59 +0800
parents 5635a4017061
children 9599e86159ac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15434
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
1 import sys
15247
3cd1605e9d8e tests: remove temp doctest file when finished running it
Idan Kamara <idankk86@gmail.com>
parents: 15235
diff changeset
2
15434
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
3 globalvars = {}
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
4 localvars = {}
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
5 lines = sys.stdin.readlines()
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
6 while lines:
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
7 l = lines.pop(0)
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
8 if l.startswith('SALT'):
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
9 print l[:-1]
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
10 elif l.startswith('>>> '):
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
11 snippet = l[4:]
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
12 while lines and lines[0].startswith('... '):
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
13 l = lines.pop(0)
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
14 snippet += "\n" + l[4:]
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
15 c = compile(snippet, '<heredoc>', 'single')
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
16 try:
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
17 exec c in globalvars, localvars
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
18 except Exception, inst:
5635a4017061 run-tests: replace inline python handling with more native scheme
Matt Mackall <mpm@selenic.com>
parents: 15398
diff changeset
19 print repr(inst)