Mercurial > hg
annotate tests/test-narrow-trackedcmd.t @ 39548:7ce9dea3a14a
localrepo: move repo creation logic out of localrepository.__init__ (API)
It has long bothered me that local repository creation is handled as
part of localrepository.__init__. Upcoming changes I want to make
around how repositories are initialized and instantiated will make
the continued existence of repository creation code in
localrepository.__init__ even more awkward.
localrepository instances are almost never constructed directly:
instead, callers are supposed to go through hg.repository() to obtain
a handle on a repository. And hg.repository() calls
localrepo.instance() to return a new repo instance.
This commit teaches localrepo.instance() to handle the create=True
logic. Most of the code for repo construction has been moved to a
standalone function. This allows extensions to monkeypatch the function
to further customize freshly-created repositories.
A few calls to localrepo.localrepository.__init__ that were passing
create=True were converted to call localrepo.instance().
.. api:: local repo creation moved out of constructor
``localrepo.localrepository.__init__`` no longer accepts a
``create`` argument to create a new repository. New repository
creation is now performed as part of ``localrepo.instance()``
and the bulk of the work is performed by
``localrepo.createrepository()``.
Differential Revision: https://phab.mercurial-scm.org/D4534
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 11 Sep 2018 13:46:59 -0700 |
parents | ab20ee07b82d |
children | 8604f130eb43 |
rev | line source |
---|---|
39440
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
1 #testcases flat tree |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
2 $ . "$TESTDIR/narrow-library.sh" |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
3 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
4 #if tree |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
5 $ cat << EOF >> $HGRCPATH |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
6 > [experimental] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
7 > treemanifest = 1 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
8 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
9 #endif |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
10 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
11 $ hg init master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
12 $ cd master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
13 $ cat >> .hg/hgrc <<EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
14 > [narrow] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
15 > serveellipses=True |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
16 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
17 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
18 $ mkdir inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
19 $ echo 'inside' > inside/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
20 $ hg add inside/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
21 $ hg commit -m 'add inside' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
22 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
23 $ mkdir widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
24 $ echo 'widest' > widest/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
25 $ hg add widest/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
26 $ hg commit -m 'add widest' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
27 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
28 $ mkdir outside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
29 $ echo 'outside' > outside/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
30 $ hg add outside/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
31 $ hg commit -m 'add outside' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
32 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
33 $ cd .. |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
34 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
35 narrow clone the inside file |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
36 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
37 $ hg clone --narrow ssh://user@dummy/master narrow --include inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
38 requesting all changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
39 adding changesets |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
40 adding manifests |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
41 adding file changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
42 added 2 changesets with 1 changes to 1 files |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
43 new changesets *:* (glob) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
44 updating to branch default |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
46 $ cd narrow |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
47 $ hg tracked |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
48 I path:inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
49 $ ls |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
50 inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
51 $ cat inside/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
52 inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
53 $ cd .. |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
54 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
55 add more upstream files which we will include in a wider narrow spec |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
56 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
57 $ cd master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
58 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
59 $ mkdir wider |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
60 $ echo 'wider' > wider/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
61 $ hg add wider/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
62 $ echo 'widest v2' > widest/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
63 $ hg commit -m 'add wider, update widest' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
64 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
65 $ echo 'widest v3' > widest/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
66 $ hg commit -m 'update widest v3' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
67 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
68 $ echo 'inside v2' > inside/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
69 $ hg commit -m 'update inside' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
70 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
71 $ mkdir outside2 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
72 $ echo 'outside2' > outside2/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
73 $ hg add outside2/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
74 $ hg commit -m 'add outside2' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
75 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
76 $ echo 'widest v4' > widest/f |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
77 $ hg commit -m 'update widest v4' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
78 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
79 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
80 7: update widest v4 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
81 6: add outside2 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
82 5: update inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
83 4: update widest v3 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
84 3: add wider, update widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
85 2: add outside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
86 1: add widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
87 0: add inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
88 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
89 $ cd .. |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
90 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
91 Testing the --import-rules flag of `hg tracked` command |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
92 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
93 $ cd narrow |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
94 $ hg tracked --import-rules |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
95 hg tracked: option --import-rules requires argument |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
96 hg tracked [OPTIONS]... [REMOTE] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
97 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
98 show or change the current narrowspec |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
99 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
100 options ([+] can be repeated): |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
101 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
102 --addinclude VALUE [+] new paths to include |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
103 --removeinclude VALUE [+] old paths to no longer include |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
104 --addexclude VALUE [+] new paths to exclude |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
105 --import-rules VALUE import narrowspecs from a file |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
106 --removeexclude VALUE [+] old paths to no longer exclude |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
107 --clear whether to replace the existing narrowspec |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
108 --force-delete-local-changes forces deletion of local changes when |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
109 narrowing |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
110 -e --ssh CMD specify ssh command to use |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
111 --remotecmd CMD specify hg command to run on the remote side |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
112 --insecure do not verify server certificate (ignoring |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
113 web.cacerts config) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
114 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
115 (use 'hg tracked -h' to show more help) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
116 [255] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
117 $ hg tracked --import-rules doesnotexist |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
118 abort: cannot read narrowspecs from '$TESTTMP/narrow/doesnotexist': $ENOENT$ |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
119 [255] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
120 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
121 $ cat > specs <<EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
122 > %include foo |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
123 > [include] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
124 > path:widest/ |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
125 > [exclude] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
126 > path:inside/ |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
127 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
128 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
129 $ hg tracked --import-rules specs |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
130 abort: including other spec files using '%include' is not supported in narrowspec |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
131 [255] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
132 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
133 $ cat > specs <<EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
134 > [include] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
135 > outisde |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
136 > [exclude] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
137 > inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
138 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
139 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
140 $ hg tracked --import-rules specs |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
141 comparing with ssh://user@dummy/master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
142 searching for changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
143 looking for local changes to affected paths |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
144 deleting data/inside/f.i |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
145 deleting meta/inside/00manifest.i (tree !) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
146 no changes found |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
147 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
148 adding changesets |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
149 adding manifests |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
150 adding file changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
151 added 2 changesets with 0 changes to 0 files |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
152 new changesets *:* (glob) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
153 $ hg tracked |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
154 I path:outisde |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
155 X path:inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
156 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
157 Testing the --import-rules flag with --addinclude and --addexclude |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
158 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
159 $ cat > specs <<EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
160 > [include] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
161 > widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
162 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
163 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
164 $ hg tracked --import-rules specs --addinclude 'wider/' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
165 comparing with ssh://user@dummy/master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
166 searching for changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
167 no changes found |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
168 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
169 adding changesets |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
170 adding manifests |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
171 adding file changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
172 added 3 changesets with 1 changes to 1 files |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
173 new changesets *:* (glob) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
174 $ hg tracked |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
175 I path:outisde |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
176 I path:wider |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
177 I path:widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
178 X path:inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
179 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
180 $ cat > specs <<EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
181 > [exclude] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
182 > outside2 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
183 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
184 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
185 $ hg tracked --import-rules specs --addexclude 'widest' |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
186 comparing with ssh://user@dummy/master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
187 searching for changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
188 looking for local changes to affected paths |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
189 deleting data/widest/f.i |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
190 deleting meta/widest/00manifest.i (tree !) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
191 $ hg tracked |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
192 I path:outisde |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
193 I path:wider |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
194 X path:inside |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
195 X path:outside2 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
196 X path:widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
197 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
198 $ hg tracked --import-rules specs --clear |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
199 The --clear option is not yet supported. |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
200 [1] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
201 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
202 Testing with passing a out of wdir file |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
203 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
204 $ cat > ../nspecs <<EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
205 > [include] |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
206 > widest |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
207 > EOF |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
208 |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
209 $ hg tracked --import-rules ../nspecs |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
210 comparing with ssh://user@dummy/master |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
211 searching for changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
212 no changes found |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
213 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
214 adding changesets |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
215 adding manifests |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
216 adding file changes |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
217 added 3 changesets with 0 changes to 0 files |
ab20ee07b82d
narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
218 new changesets *:* (glob) |