mercurial/commands.py
changeset 3661 c15c5aedaf47
parent 3660 d793e09e1b71
child 3662 da361aa7a118
equal deleted inserted replaced
3660:d793e09e1b71 3661:c15c5aedaf47
    21 
    21 
    22 def bail_if_changed(repo):
    22 def bail_if_changed(repo):
    23     modified, added, removed, deleted = repo.status()[:4]
    23     modified, added, removed, deleted = repo.status()[:4]
    24     if modified or added or removed or deleted:
    24     if modified or added or removed or deleted:
    25         raise util.Abort(_("outstanding uncommitted changes"))
    25         raise util.Abort(_("outstanding uncommitted changes"))
    26 
       
    27 def relpath(repo, args):
       
    28     cwd = repo.getcwd()
       
    29     if cwd:
       
    30         return [util.normpath(os.path.join(cwd, x)) for x in args]
       
    31     return args
       
    32 
    26 
    33 def logmessage(opts):
    27 def logmessage(opts):
    34     """ get the log message according to -m and -l option """
    28     """ get the log message according to -m and -l option """
    35     message = opts['message']
    29     message = opts['message']
    36     logfile = opts['logfile']
    30     logfile = opts['logfile']