Show More
@@ -80,9 +80,7 b' def snapshot_wdir(ui, repo, files, tmpro' | |||||
80 | '''snapshot files from working directory. |
|
80 | '''snapshot files from working directory. | |
81 | if not using snapshot, -I/-X does not work and recursive diff |
|
81 | if not using snapshot, -I/-X does not work and recursive diff | |
82 | in tools like kdiff3 and meld displays too many files.''' |
|
82 | in tools like kdiff3 and meld displays too many files.''' | |
83 | repo_root = repo.root |
|
83 | dirname = os.path.basename(repo.root) | |
84 |
|
||||
85 | dirname = os.path.basename(repo_root) |
|
|||
86 | if dirname == "": |
|
84 | if dirname == "": | |
87 | dirname = "root" |
|
85 | dirname = "root" | |
88 | base = os.path.join(tmproot, dirname) |
|
86 | base = os.path.join(tmproot, dirname) | |
@@ -105,8 +103,7 b' def snapshot_wdir(ui, repo, files, tmpro' | |||||
105 | fp.write(chunk) |
|
103 | fp.write(chunk) | |
106 | fp.close() |
|
104 | fp.close() | |
107 |
|
105 | |||
108 |
fns_and_mtime.append((dest, os.path. |
|
106 | fns_and_mtime.append((dest, repo.wjoin(fn), os.path.getmtime(dest))) | |
109 | os.path.getmtime(dest))) |
|
|||
110 |
|
107 | |||
111 |
|
108 | |||
112 | return dirname, fns_and_mtime |
|
109 | return dirname, fns_and_mtime |
@@ -64,7 +64,7 b' def purge(ui, repo, *dirs, **opts):' | |||||
64 | def remove(remove_func, name): |
|
64 | def remove(remove_func, name): | |
65 | if act: |
|
65 | if act: | |
66 | try: |
|
66 | try: | |
67 |
remove_func( |
|
67 | remove_func(repo.wjoin(name)) | |
68 | except OSError: |
|
68 | except OSError: | |
69 | m = _('%s cannot be removed') % name |
|
69 | m = _('%s cannot be removed') % name | |
70 | if opts['abort_on_err']: |
|
70 | if opts['abort_on_err']: |
@@ -1797,7 +1797,7 b' def locate(ui, repo, *pats, **opts):' | |||||
1797 | if not rev and abs not in repo.dirstate: |
|
1797 | if not rev and abs not in repo.dirstate: | |
1798 | continue |
|
1798 | continue | |
1799 | if opts.get('fullpath'): |
|
1799 | if opts.get('fullpath'): | |
1800 |
ui.write( |
|
1800 | ui.write(repo.wjoin(abs), end) | |
1801 | else: |
|
1801 | else: | |
1802 | ui.write(((pats and m.rel(abs)) or abs), end) |
|
1802 | ui.write(((pats and m.rel(abs)) or abs), end) | |
1803 | ret = 0 |
|
1803 | ret = 0 |
@@ -1057,7 +1057,7 b' def updatedir(ui, repo, patches, similar' | |||||
1057 | gp = patches[f] |
|
1057 | gp = patches[f] | |
1058 | if gp and gp.mode: |
|
1058 | if gp and gp.mode: | |
1059 | islink, isexec = gp.mode |
|
1059 | islink, isexec = gp.mode | |
1060 |
dst = |
|
1060 | dst = repo.wjoin(gp.path) | |
1061 | # patch won't create empty files |
|
1061 | # patch won't create empty files | |
1062 | if gp.op == 'ADD' and not os.path.exists(dst): |
|
1062 | if gp.op == 'ADD' and not os.path.exists(dst): | |
1063 | flags = (isexec and 'x' or '') + (islink and 'l' or '') |
|
1063 | flags = (isexec and 'x' or '') + (islink and 'l' or '') |
General Comments 0
You need to be logged in to leave comments.
Login now