Show More
@@ -379,13 +379,14 b' class workingctx(changectx):' | |||||
379 |
|
379 | |||
380 | man = self._parents[0].manifest().copy() |
|
380 | man = self._parents[0].manifest().copy() | |
381 | is_exec = util.execfunc(self._repo.root, man.execf) |
|
381 | is_exec = util.execfunc(self._repo.root, man.execf) | |
|
382 | is_link = util.linkfunc(self._repo.root, man.linkf) | |||
382 | copied = self._repo.dirstate.copies() |
|
383 | copied = self._repo.dirstate.copies() | |
383 | modified, added, removed, deleted, unknown = self._status[:5] |
|
384 | modified, added, removed, deleted, unknown = self._status[:5] | |
384 | for i, l in (("a", added), ("m", modified), ("u", unknown)): |
|
385 | for i, l in (("a", added), ("m", modified), ("u", unknown)): | |
385 | for f in l: |
|
386 | for f in l: | |
386 | man[f] = man.get(copied.get(f, f), nullid) + i |
|
387 | man[f] = man.get(copied.get(f, f), nullid) + i | |
387 | try: |
|
388 | try: | |
388 | man.set(f, is_exec(f)) |
|
389 | man.set(f, is_exec(f), is_link(f)) | |
389 | except OSError: |
|
390 | except OSError: | |
390 | pass |
|
391 | pass | |
391 |
|
392 |
@@ -713,11 +713,12 b' class localrepository(repo.repository):' | |||||
713 | linkrev = self.changelog.count() |
|
713 | linkrev = self.changelog.count() | |
714 | commit.sort() |
|
714 | commit.sort() | |
715 | is_exec = util.execfunc(self.root, m1.execf) |
|
715 | is_exec = util.execfunc(self.root, m1.execf) | |
|
716 | is_link = util.linkfunc(self.root, m1.linkf) | |||
716 | for f in commit: |
|
717 | for f in commit: | |
717 | self.ui.note(f + "\n") |
|
718 | self.ui.note(f + "\n") | |
718 | try: |
|
719 | try: | |
719 | new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed) |
|
720 | new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed) | |
720 | m1.set(f, is_exec(f)) |
|
721 | m1.set(f, is_exec(f), is_link(f)) | |
721 | except IOError: |
|
722 | except IOError: | |
722 | if use_dirstate: |
|
723 | if use_dirstate: | |
723 | self.ui.warn(_("trouble committing %s!\n") % f) |
|
724 | self.ui.warn(_("trouble committing %s!\n") % f) | |
@@ -879,9 +880,10 b' class localrepository(repo.repository):' | |||||
879 | # XXX: create it in dirstate.py ? |
|
880 | # XXX: create it in dirstate.py ? | |
880 | mf2 = mfmatches(self.dirstate.parents()[0]) |
|
881 | mf2 = mfmatches(self.dirstate.parents()[0]) | |
881 | is_exec = util.execfunc(self.root, mf2.execf) |
|
882 | is_exec = util.execfunc(self.root, mf2.execf) | |
|
883 | is_link = util.linkfunc(self.root, mf2.linkf) | |||
882 | for f in lookup + modified + added: |
|
884 | for f in lookup + modified + added: | |
883 | mf2[f] = "" |
|
885 | mf2[f] = "" | |
884 | mf2.set(f, is_exec(f)) |
|
886 | mf2.set(f, is_exec(f), is_link(f)) | |
885 | for f in removed: |
|
887 | for f in removed: | |
886 | if f in mf2: |
|
888 | if f in mf2: | |
887 | del mf2[f] |
|
889 | del mf2[f] |
@@ -713,7 +713,7 b' def execfunc(path, fallback):' | |||||
713 | return lambda x: is_exec(os.path.join(path, x)) |
|
713 | return lambda x: is_exec(os.path.join(path, x)) | |
714 | return fallback |
|
714 | return fallback | |
715 |
|
715 | |||
716 |
def check |
|
716 | def checklink(path): | |
717 | """check whether the given path is on a symlink-capable filesystem""" |
|
717 | """check whether the given path is on a symlink-capable filesystem""" | |
718 | # mktemp is not racy because symlink creation will fail if the |
|
718 | # mktemp is not racy because symlink creation will fail if the | |
719 | # file already exists |
|
719 | # file already exists |
@@ -21,8 +21,7 b' abort: no match under directory .../test' | |||||
21 | dir/file |
|
21 | dir/file | |
22 | does-not-exist: No such file or directory |
|
22 | does-not-exist: No such file or directory | |
23 | abort: file .../test/does-not-exist not found! |
|
23 | abort: file .../test/does-not-exist not found! | |
24 | baz: unsupported file type (type is symbolic link) |
|
24 | abort: file .../test/baz not tracked! | |
25 | abort: can't commit .../test/baz: unsupported file type! |
|
|||
26 | abort: file .../test/quux not tracked! |
|
25 | abort: file .../test/quux not tracked! | |
27 | dir/file |
|
26 | dir/file | |
28 | % partial subdir commit test |
|
27 | % partial subdir commit test |
@@ -1,11 +1,12 b'' | |||||
|
1 | adding bar | |||
1 | adding foo |
|
2 | adding foo | |
2 | adding bomb |
|
3 | adding bomb | |
3 | adding a.c |
|
4 | adding a.c | |
4 | adding dir/a.o |
|
5 | adding dir/a.o | |
5 | adding dir/b.o |
|
6 | adding dir/b.o | |
|
7 | M dir/b.o | |||
6 | ! a.c |
|
8 | ! a.c | |
7 | ! dir/a.o |
|
9 | ! dir/a.o | |
8 | ! dir/b.o |
|
|||
9 | ? .hgignore |
|
10 | ? .hgignore | |
10 | a.c: unsupported file type (type is fifo) |
|
11 | a.c: unsupported file type (type is fifo) | |
11 | ! a.c |
|
12 | ! a.c |
General Comments 0
You need to be logged in to leave comments.
Login now