Show More
@@ -0,0 +1,34 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "mq=" >> $HGRCPATH | |
|
5 | ||
|
6 | cat >> readlink.py <<EOF | |
|
7 | import errno, os, sys | |
|
8 | ||
|
9 | for f in sys.argv[1:]: | |
|
10 | try: | |
|
11 | print f, '->', os.readlink(f) | |
|
12 | except OSError, err: | |
|
13 | if err.errno != errno.EINVAL: raise | |
|
14 | print f, 'not a symlink' | |
|
15 | EOF | |
|
16 | ||
|
17 | hg init | |
|
18 | hg qinit | |
|
19 | hg qnew base.patch | |
|
20 | echo a > a | |
|
21 | echo b > b | |
|
22 | hg add a b | |
|
23 | hg qrefresh | |
|
24 | python readlink.py a | |
|
25 | ||
|
26 | hg qnew symlink.patch | |
|
27 | rm a | |
|
28 | ln -s b a | |
|
29 | hg qrefresh --git | |
|
30 | python readlink.py a | |
|
31 | ||
|
32 | hg qpop | |
|
33 | hg qpush | |
|
34 | python readlink.py a |
@@ -0,0 +1,6 b'' | |||
|
1 | a -> a not a symlink | |
|
2 | a -> b | |
|
3 | Now at: base.patch | |
|
4 | applying symlink.patch | |
|
5 | Now at: symlink.patch | |
|
6 | a -> b |
@@ -810,9 +810,9 b' class queue:' | |||
|
810 | 810 | del wlock |
|
811 | 811 | |
|
812 | 812 | def pop(self, repo, patch=None, force=False, update=True, all=False): |
|
813 | def getfile(f, rev): | |
|
813 | def getfile(f, rev, flags): | |
|
814 | 814 | t = repo.file(f).read(rev) |
|
815 |
repo.w |
|
|
815 | repo.wwrite(f, t, flags) | |
|
816 | 816 | |
|
817 | 817 | wlock = repo.wlock() |
|
818 | 818 | try: |
@@ -870,10 +870,9 b' class queue:' | |||
|
870 | 870 | if d: |
|
871 | 871 | raise util.Abort("deletions found between repo revs") |
|
872 | 872 | for f in m: |
|
873 | getfile(f, mmap[f]) | |
|
873 | getfile(f, mmap[f], mmap.flags(f)) | |
|
874 | 874 | for f in r: |
|
875 | getfile(f, mmap[f]) | |
|
876 | util.set_exec(repo.wjoin(f), mmap.execf(f)) | |
|
875 | getfile(f, mmap[f], mmap.flags(f)) | |
|
877 | 876 | for f in m + r: |
|
878 | 877 | repo.dirstate.normal(f) |
|
879 | 878 | for f in a: |
General Comments 0
You need to be logged in to leave comments.
Login now