--- a/contrib/synthrepo.py Fri Mar 13 14:20:13 2015 -0400
+++ b/contrib/synthrepo.py Fri Mar 13 17:00:06 2015 -0400
@@ -359,7 +359,10 @@
files.iterkeys(), filectxfn, ui.username(),
'%d %d' % util.makedate())
initnode = mc.commit()
- hexfn = ui.debugflag and hex or short
+ if ui.debugflag:
+ hexfn = hex
+ else:
+ hexfn = short
ui.status(_('added commit %s with %d files\n')
% (hexfn(initnode), len(files)))
@@ -475,7 +478,10 @@
if dirpath in replacements:
return replacements[dirpath]
head, _ = os.path.split(dirpath)
- head = head and rename(head) or ''
+ if head:
+ head = rename(head)
+ else:
+ head = ''
renamed = os.path.join(head, wordgen.next())
replacements[dirpath] = renamed
return renamed