FTP Extension

{X} FTP is insecure and should never be used on the public internet!


This extension is not distributed with Mercurial.

Author: André Klitzing

Repository: https://bitbucket.org/misery/hgftp/wiki/Home

Accouncement: http://markmail.org/thread/hly5zftmszqiq5iz


Upload snapshots of a revision to one or more FTP server.

It will upload all files of a revision and set a (local) tag like "uploaded@host". If it will find an existing tag for that host it will remove vanished files and upload only the difference between that revision and the new one.


To enable this extension, add this to your .hgrc file:

    hgext.ftp = /path/to/ftp.py



You can add multiple destinations to [paths] like in push/pull.

    ftp    = ftp://[user[:pass]@]host[:port]/[path]
    myhost = ftp://andre@incubo.de/htdocs

You can select it like:

    hg ftp myhost

Or you can provide a complete URL:

    hg ftp ftp://user:psw@host/basedir

If you don't provide a Destination it will use ftp in [paths] by default.


If you add chmod_file or chmod_dir it will CHMOD it on upload. If there is no option for chmod the extension won't call "SITE CHMOD" on ftp server.

    chmod_file  = 644
    chmod_dir   = 755
    global_tags = False
    prefix_tags = uploaded@


There are some options that can overwrite settings in your hgrc.

The extension will only start uploading / removing your files if you provide --upload as an option. A tag will only be set if upload was successful.



upload all files of a changeset; do not use the difference



CHMOD new directories to given mode



CHMOD new/changed files to given mode



make the tag global



only upload or remove files; do not set a tag



revision that will be uploaded



show files that will be uploaded or deleted



use another tag name



start uploading or removing changed files

If --rev is not provided it will use the current revision of your working dir. But it won't use uncommitted changes of that working dir.

There will be no prefix if you use --tag!


FTPExtension (last edited 2017-06-30 07:18:08 by dev-ranft)