annotate tests/test-convert-bzr-treeroot.t @ 23976:344939126579 stable

largefiles: don't interfere with logging normal files The previous code was adding standin files to the matcher's file list when neither the standin file nor the original existed in the context. Somehow, this was confusing the logging code into behaving differently from when the extension wasn't loaded. It seems that this was an attempt to support naming a directory that only contains largefiles, as a test fails if the else clause is dropped entirely. Therefore, only append the "standin" if it is a directory. This was found by running the test suite with --config extensions.largefiles=. The first added test used to log an additional cset that wasn't logged normally. The only relation it had to file 'a' is that 'a' was the source of a move, but it isn't clear why having '.hglf/a' in the list causes this change: @@ -47,6 +47,11 @@ Make sure largefiles doesn't interfere with logging a regular file $ hg log a --config extensions.largefiles= + changeset: 3:2ca5ba701980 + user: test + date: Thu Jan 01 00:00:04 1970 +0000 + summary: d + changeset: 0:9161b9aeaf16 user: test date: Thu Jan 01 00:00:01 1970 +0000 The second added test used to complain about a file not being in the parent revision: @@ -1638,10 +1643,8 @@ Ensure that largefiles doesn't intefere with following a normal file $ hg --config extensions.largefiles= log -f d -T '{desc}' -G - @ c - | - o a - + abort: cannot follow file not in parent revision: ".hglf/d" + [255] $ hg log -f d/a -T '{desc}' -G @ c | Note that there is still something fishy with the largefiles code, because when using a glob pattern like this: $ hg log 'glob:sub/*' the pattern list would contain '.hglf/glob:sub/*'. None of the tests show this (this test lives in test-largefiles.t at 1349), it was just something that I noticed when the code was loaded up with print statements.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 30 Jan 2015 20:44:11 -0500
parents f2719b387380
children 89872688893f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
1
12517
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
2 $ . "$TESTDIR/bzr-definitions"
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
3 $ cat > treeset.py <<EOF
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
4 > import sys
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
5 > from bzrlib import workingtree
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
6 > wt = workingtree.WorkingTree.open('.')
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
7 >
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
8 > message, rootid = sys.argv[1:]
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
9 > wt.set_root_id('tree_root-%s' % rootid)
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
10 > wt.commit(message)
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
11 > EOF
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
12
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
13 change the id of the tree root
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
14
12517
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
15 $ mkdir test-change-treeroot-id
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
16 $ cd test-change-treeroot-id
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
17 $ bzr init -q source
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
18 $ cd source
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
19 $ echo content > file
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
20 $ bzr add -q file
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
21 $ bzr commit -q -m 'Initial add'
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
22 $ python ../../treeset.py 'Changed root' new
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
23 $ cd ..
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
24 $ hg convert source source-hg
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
25 initializing destination source-hg repository
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
26 scanning source...
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
27 sorting...
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
28 converting...
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
29 1 Initial add
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
30 0 Changed root
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
31 $ manifest source-hg tip
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
32 % manifest of tip
cc8f1083e8be tests: unify test-convert-bzr-treeroot
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
33 644 file
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 12517
diff changeset
34
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 12517
diff changeset
35 $ cd ..