D939: remotenames: add functionality to store remotenames under .hg/hgremotenames/

dlax (Denis Laxalde) phabricator at mercurial-scm.org
Thu Oct 5 03:57:43 EDT 2017


dlax requested changes to this revision.
dlax added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> remotenames.py:31
>  
> +def saveremotebookmarks(repo, vfs, remotepath, bookmarks):
> +    """ save remote bookmarks in .hg/remotenames/bookmarks.

`repo` parameter is not used

> remotenames.py:45
> +            f.write('%s %s\n' %
> +                (node, joinremotename(remotepath, bookmark)))
> +    f.close()

Incorrect indentation.

> remotenames.py:48
> +
> +def saveremotebranches(repo, vfs, remotepath, branches):
> +    """ save remote branches is .hg/remotenames/branches.

ditto for `repo`

> remotenames.py:64
> +
> +    f.close()
> +

Functions `saveremotebranches` and `saveremotebookmarks` are very similar, only differing by the vfs file name. Perhaps there could be a single function taking the filename as a parameter?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D939

To: pulkit, #hg-reviewers, dlax
Cc: dlax, mercurial-devel


More information about the Mercurial-devel mailing list