Mercurial > hg
annotate tests/test-inotify-debuginotify.t @ 18944:a9c443b3b240
unionrepo: read-only operations on a union of two localrepos
unionrepo is just like bundlerepo without bundles.
The implementation is very similar to bundlerepo, but I don't see any obvious
way to generalize it.
Some most obvious use cases for this would be log and diff across local repos,
as a kind of preview of pulls, for instance:
$ hg -R union:repo1+repo2 heads
$ hg -R union:repo1+repo2 log -r REPO1REV -r REPO2REV
$ hg -R union:repo1+repo2 log -r '::REPO1REV-::REPO2REV'
$ hg -R union:repo1+repo2 log -r 'ancestor(REPO1REV,REPO2REV)'
$ hg -R union:repo1+repo2 diff -r REPO1REV -r REPO2REV
This is going to be used in RhodeCode, and Bitbucket already uses something
similar. Having a core implementation would be beneficial.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 18 Jan 2013 15:54:09 +0100 |
parents | 104e120416ec |
children |
rev | line source |
---|---|
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
1 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
2 $ "$TESTDIR/hghave" inotify || exit 80 |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
3 $ hg init |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
4 $ echo "[extensions]" >> $HGRCPATH |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
5 $ echo "inotify=" >> $HGRCPATH |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
6 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
7 inserve |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
8 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
9 $ hg inserve -d --pid-file=hg.pid |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
10 $ cat hg.pid >> "$DAEMON_PIDS" |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
11 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
12 let the daemon finish its stuff |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
13 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
14 $ sleep 1 |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
15 |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
16 empty |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
17 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
18 $ hg debuginotify |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
19 directories being watched: |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
20 / |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
21 .hg/ |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
22 $ mkdir a |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
23 $ sleep 1 |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
24 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
25 only 'a |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
26 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
27 $ hg debuginotify |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
28 directories being watched: |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
29 / |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
30 .hg/ |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
31 a/ |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
32 $ rmdir a |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
33 $ sleep 1 |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
34 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
35 empty again |
8555
3e09bc5fee12
inotify: introduce debuginotify, which lists which paths are under watch
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
36 |
12451
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
37 $ hg debuginotify |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
38 directories being watched: |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
39 / |
17ebf11bff81
tests: unify test-inotify-debuginotify
Matt Mackall <mpm@selenic.com>
parents:
8555
diff
changeset
|
40 .hg/ |
18590
104e120416ec
test-inotify-debuginotify.t: migrate to killdaemons from kill `cat pidfile`
Augie Fackler <raf@durin42.com>
parents:
12451
diff
changeset
|
41 $ "$TESTDIR/killdaemons.py" hg.pid |