Show More
@@ -404,7 +404,7 b' class mergestate(object):' | |||
|
404 | 404 | def _checkunknownfile(repo, wctx, mctx, f, f2=None): |
|
405 | 405 | if f2 is None: |
|
406 | 406 | f2 = f |
|
407 |
return ( |
|
|
407 | return (repo.wvfs.isfileorlink(f) | |
|
408 | 408 | and repo.wvfs.audit.check(f) |
|
409 | 409 | and repo.dirstate.normalize(f) not in repo.dirstate |
|
410 | 410 | and mctx[f2].cmp(wctx[f])) |
@@ -312,6 +312,17 b' class abstractvfs(object):' | |||
|
312 | 312 | def islink(self, path=None): |
|
313 | 313 | return os.path.islink(self.join(path)) |
|
314 | 314 | |
|
315 | def isfileorlink(self, path=None): | |
|
316 | '''return whether path is a regular file or a symlink | |
|
317 | ||
|
318 | Unlike isfile, this doesn't follow symlinks.''' | |
|
319 | try: | |
|
320 | st = self.lstat(path) | |
|
321 | except OSError: | |
|
322 | return False | |
|
323 | mode = st.st_mode | |
|
324 | return stat.S_ISREG(mode) or stat.S_ISLNK(mode) | |
|
325 | ||
|
315 | 326 | def reljoin(self, *paths): |
|
316 | 327 | """join various elements of a path together (as os.path.join would do) |
|
317 | 328 |
@@ -102,6 +102,28 b' merge should fail' | |||
|
102 | 102 | b: untracked file differs |
|
103 | 103 | abort: untracked files in working directory differ from files in requested revision |
|
104 | 104 | [255] |
|
105 | ||
|
106 | #if symlink | |
|
107 | symlinks to directories should be treated as regular files (issue5027) | |
|
108 | $ rm b | |
|
109 | $ ln -s 'This is file b2' b | |
|
110 | $ hg merge 1 | |
|
111 | b: untracked file differs | |
|
112 | abort: untracked files in working directory differ from files in requested revision | |
|
113 | [255] | |
|
114 | symlinks shouldn't be followed | |
|
115 | $ rm b | |
|
116 | $ echo This is file b1 > .hg/b | |
|
117 | $ ln -s .hg/b b | |
|
118 | $ hg merge 1 | |
|
119 | b: untracked file differs | |
|
120 | abort: untracked files in working directory differ from files in requested revision | |
|
121 | [255] | |
|
122 | ||
|
123 | $ rm b | |
|
124 | $ echo This is file b2 > b | |
|
125 | #endif | |
|
126 | ||
|
105 | 127 | merge of b expected |
|
106 | 128 | $ hg merge -f 1 |
|
107 | 129 | merging b |
General Comments 0
You need to be logged in to leave comments.
Login now