even better
This commit is contained in:
+1
-3
@@ -329,12 +329,10 @@ def clean_ar_timestamps(ar_file):
|
|||||||
def calculate_hash(path):
|
def calculate_hash(path):
|
||||||
"""Return a (path, hash) tuple for given path."""
|
"""Return a (path, hash) tuple for given path."""
|
||||||
if os.path.islink(path):
|
if os.path.islink(path):
|
||||||
try:
|
|
||||||
# For symlinks, path string is hashed instead of the content
|
# For symlinks, path string is hashed instead of the content
|
||||||
value = sha1_data(os.readlink(path))
|
value = sha1_data(os.readlink(path))
|
||||||
except FileError:
|
if not os.path.exists(path):
|
||||||
ctx.ui.info(_("Including external link '%s'") % path)
|
ctx.ui.info(_("Including external link '%s'") % path)
|
||||||
value = None
|
|
||||||
elif os.path.isdir(path):
|
elif os.path.isdir(path):
|
||||||
ctx.ui.info(_("Including directory '%s'") % path)
|
ctx.ui.info(_("Including directory '%s'") % path)
|
||||||
value = None
|
value = None
|
||||||
|
|||||||
Reference in New Issue
Block a user