Merge lp:~aaron-whitehouse/duplicity/08-ufn-to-uc_name into lp:~duplicity-team/duplicity/0.8-series

Proposed by Aaron Whitehouse
Status: Merged
Merged at revision: 1293
Proposed branch: lp:~aaron-whitehouse/duplicity/08-ufn-to-uc_name
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 181 lines (+18/-18)
8 files modified
duplicity/backend.py (+1/-1)
duplicity/collections.py (+1/-1)
duplicity/commandline.py (+5/-5)
duplicity/diffdir.py (+1/-1)
duplicity/dup_temp.py (+1/-1)
duplicity/path.py (+7/-7)
duplicity/robust.py (+1/-1)
duplicity/selection.py (+1/-1)
To merge this branch: bzr merge lp:~aaron-whitehouse/duplicity/08-ufn-to-uc_name
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+335191@code.launchpad.net

Description of the change

Replace util.ufn(path.name) with path.uc_name throughout.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/backend.py'
2--- duplicity/backend.py 2017-11-27 22:26:22 +0000
3+++ duplicity/backend.py 2017-12-13 22:56:51 +0000
4@@ -553,7 +553,7 @@
5 local_path.setdata()
6 if not local_path.exists():
7 raise BackendException(_("File %s not found locally after get "
8- "from backend") % util.ufn(local_path.name))
9+ "from backend") % local_path.uc_name)
10 else:
11 raise NotImplementedError()
12
13
14=== modified file 'duplicity/collections.py'
15--- duplicity/collections.py 2017-11-18 17:06:48 +0000
16+++ duplicity/collections.py 2017-12-13 22:56:51 +0000
17@@ -649,7 +649,7 @@
18 u"-----------------",
19 _("Connecting with backend: %s") %
20 (self.backend.__class__.__name__,),
21- _("Archive dir: %s") % (util.ufn(self.archive_dir_path.name if self.archive_dir_path else 'None'),)]
22+ _("Archive dir: %s") % (self.archive_dir_path.uc_name if self.archive_dir_path else 'None',)]
23
24 l.append("\n" +
25 ngettext("Found %d secondary backup chain.",
26
27=== modified file 'duplicity/commandline.py'
28--- duplicity/commandline.py 2017-12-01 22:39:33 +0000
29+++ duplicity/commandline.py 2017-12-13 22:56:51 +0000
30@@ -763,7 +763,7 @@
31 set_archive_dir(expand_archive_dir(globals.archive_dir,
32 globals.backup_name))
33
34- log.Info(_("Using archive dir: %s") % (util.ufn(globals.archive_dir_path.name),))
35+ log.Info(_("Using archive dir: %s") % (globals.archive_dir_path.uc_name,))
36 log.Info(_("Using backup name: %s") % (globals.backup_name,))
37
38 return args
39@@ -990,7 +990,7 @@
40 archive_dir_path = path.Path(dirstring)
41 if not archive_dir_path.isdir():
42 log.FatalError(_("Specified archive directory '%s' does not exist, "
43- "or is not a directory") % (util.ufn(archive_dir_path.name),),
44+ "or is not a directory") % (archive_dir_path.uc_name,),
45 log.ErrorCode.bad_archive_dir)
46 globals.archive_dir_path = archive_dir_path
47
48@@ -1059,18 +1059,18 @@
49 if action == "restore":
50 if (local_path.exists() and not local_path.isemptydir()) and not globals.force:
51 log.FatalError(_("Restore destination directory %s already "
52- "exists.\nWill not overwrite.") % (util.ufn(local_path.name),),
53+ "exists.\nWill not overwrite.") % (local_path.uc_name,),
54 log.ErrorCode.restore_dir_exists)
55 elif action == "verify":
56 if not local_path.exists():
57 log.FatalError(_("Verify directory %s does not exist") %
58- (util.ufn(local_path.name),),
59+ (local_path.uc_name,),
60 log.ErrorCode.verify_dir_doesnt_exist)
61 else:
62 assert action == "full" or action == "inc"
63 if not local_path.exists():
64 log.FatalError(_("Backup source directory %s does not exist.")
65- % (util.ufn(local_path.name),),
66+ % (local_path.uc_name,),
67 log.ErrorCode.backup_dir_doesnt_exist)
68
69 globals.local_path = local_path
70
71=== modified file 'duplicity/diffdir.py'
72--- duplicity/diffdir.py 2017-01-19 00:32:12 +0000
73+++ duplicity/diffdir.py 2017-12-13 22:56:51 +0000
74@@ -395,7 +395,7 @@
75 buf = self.infile.read(length)
76 except IOError as ex:
77 buf = ""
78- log.Warn(_("Error %s getting delta for %s") % (str(ex), util.ufn(self.infile.name)))
79+ log.Warn(_("Error %s getting delta for %s") % (str(ex), self.infile.uc_name))
80 if stats:
81 stats.SourceFileSize += len(buf)
82 return buf
83
84=== modified file 'duplicity/dup_temp.py'
85--- duplicity/dup_temp.py 2017-07-11 14:55:38 +0000
86+++ duplicity/dup_temp.py 2017-12-13 22:56:51 +0000
87@@ -264,7 +264,7 @@
88 res = Block(self.fp.read(self.get_read_size()))
89 except Exception:
90 log.FatalError(_("Failed to read %s: %s") %
91- (util.ufn(self.src.name), sys.exc_info()),
92+ (self.src.uc_name, sys.exc_info()),
93 log.ErrorCode.generic)
94 if not res.data:
95 self.fp.close()
96
97=== modified file 'duplicity/path.py'
98--- duplicity/path.py 2017-12-01 22:39:33 +0000
99+++ duplicity/path.py 2017-12-13 22:56:51 +0000
100@@ -236,7 +236,7 @@
101 self.stat.st_mtime = int(tarinfo.mtime)
102 if self.stat.st_mtime < 0:
103 log.Warn(_("Warning: %s has negative mtime, treating as 0.")
104- % (util.ufn(tarinfo.name)))
105+ % (tarinfo.uc_name))
106 self.stat.st_mtime = 0
107 self.stat.st_size = tarinfo.size
108
109@@ -589,17 +589,17 @@
110
111 def mkdir(self):
112 """Make directory(s) at specified path"""
113- log.Info(_("Making directory %s") % util.ufn(self.name))
114+ log.Info(_("Making directory %s") % self.uc_name)
115 try:
116 os.makedirs(self.name)
117 except OSError:
118 if (not globals.force):
119- raise PathException("Error creating directory %s" % util.ufn(self.name), 7)
120+ raise PathException("Error creating directory %s" % self.uc_name, 7)
121 self.setdata()
122
123 def delete(self):
124 """Remove this file"""
125- log.Info(_("Deleting %s") % util.ufn(self.name))
126+ log.Info(_("Deleting %s") % self.uc_name)
127 if self.isdir():
128 util.ignore_missing(os.rmdir, self.name)
129 else:
130@@ -608,14 +608,14 @@
131
132 def touch(self):
133 """Open the file, write 0 bytes, close"""
134- log.Info(_("Touching %s") % util.ufn(self.name))
135+ log.Info(_("Touching %s") % self.uc_name)
136 fp = self.open("wb")
137 fp.close()
138
139 def deltree(self):
140 """Remove self by recursively deleting files under it"""
141 from duplicity import selection # todo: avoid circ. dep. issue
142- log.Info(_("Deleting tree %s") % util.ufn(self.name))
143+ log.Info(_("Deleting tree %s") % self.uc_name)
144 itr = IterTreeReducer(PathDeleter, [])
145 for path in selection.Select(self).set_iter():
146 itr(path.index, path)
147@@ -685,7 +685,7 @@
148 return temp_path
149 _tmp_path_counter += 1
150 assert _tmp_path_counter < 10000, \
151- u"Warning too many temp files created for " + util.ufn(self.name)
152+ u"Warning too many temp files created for " + self.uc_name
153
154 def compare_recursive(self, other, verbose=None):
155 """Compare self to other Path, descending down directories"""
156
157=== modified file 'duplicity/robust.py'
158--- duplicity/robust.py 2017-03-02 22:38:47 +0000
159+++ duplicity/robust.py 2017-12-13 22:56:51 +0000
160@@ -61,7 +61,7 @@
161 def listpath(path):
162 """Like path.listdir() but return [] if error, and sort results"""
163 def error_handler(exc):
164- log.Warn(_("Error listing directory %s") % util.ufn(path.name))
165+ log.Warn(_("Error listing directory %s") % path.uc_name)
166 return []
167 dir_listing = check_common_error(error_handler, path.listdir)
168 dir_listing.sort()
169
170=== modified file 'duplicity/selection.py'
171--- duplicity/selection.py 2017-12-01 22:39:33 +0000
172+++ duplicity/selection.py 2017-12-13 22:56:51 +0000
173@@ -150,7 +150,7 @@
174 # Path is a file or folder that cannot be read, but
175 # should be included or scanned.
176 log.Warn(_("Error accessing possibly locked file %s") %
177- util.ufn(new_path.name),
178+ new_path.uc_name,
179 log.WarningCode.cannot_read,
180 util.escape(new_path.name))
181 if diffdir.stats:

Subscribers

People subscribed via source and target branches