Show More
@@ -1644,8 +1644,8 b' def config(ui, repo, *values, **opts):' | |||
|
1644 | 1644 | samplehgrc = uimod.samplehgrcs['user'] |
|
1645 | 1645 | |
|
1646 | 1646 | f = paths[0] |
|
1647 | fp = open(f, "w") | |
|
1648 | fp.write(samplehgrc) | |
|
1647 | fp = open(f, "wb") | |
|
1648 | fp.write(util.tonativeeol(samplehgrc)) | |
|
1649 | 1649 | fp.close() |
|
1650 | 1650 | |
|
1651 | 1651 | editor = ui.geteditor() |
@@ -641,11 +641,11 b' def clone(ui, peeropts, source, dest=Non' | |||
|
641 | 641 | destrepo = destpeer.local() |
|
642 | 642 | if destrepo: |
|
643 | 643 | template = uimod.samplehgrcs['cloned'] |
|
644 |
fp = destrepo.vfs("hgrc", "w" |
|
|
644 | fp = destrepo.vfs("hgrc", "wb") | |
|
645 | 645 | u = util.url(abspath) |
|
646 | 646 | u.passwd = None |
|
647 |
defaulturl = |
|
|
648 | fp.write(template % defaulturl) | |
|
647 | defaulturl = bytes(u) | |
|
648 | fp.write(util.tonativeeol(template % defaulturl)) | |
|
649 | 649 | fp.close() |
|
650 | 650 | |
|
651 | 651 | destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') |
@@ -60,7 +60,7 b' git = 1' | |||
|
60 | 60 | |
|
61 | 61 | samplehgrcs = { |
|
62 | 62 | 'user': |
|
63 | """# example user config (see 'hg help config' for more info) | |
|
63 | b"""# example user config (see 'hg help config' for more info) | |
|
64 | 64 | [ui] |
|
65 | 65 | # name and email, e.g. |
|
66 | 66 | # username = Jane Doe <jdoe@example.com> |
@@ -82,7 +82,7 b' username =' | |||
|
82 | 82 | """, |
|
83 | 83 | |
|
84 | 84 | 'cloned': |
|
85 | """# example repository config (see 'hg help config' for more info) | |
|
85 | b"""# example repository config (see 'hg help config' for more info) | |
|
86 | 86 | [paths] |
|
87 | 87 | default = %s |
|
88 | 88 | |
@@ -99,7 +99,7 b' default = %s' | |||
|
99 | 99 | """, |
|
100 | 100 | |
|
101 | 101 | 'local': |
|
102 | """# example repository config (see 'hg help config' for more info) | |
|
102 | b"""# example repository config (see 'hg help config' for more info) | |
|
103 | 103 | [paths] |
|
104 | 104 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
105 | 105 | # (see 'hg help config.paths' for more info) |
@@ -115,7 +115,7 b' default = %s' | |||
|
115 | 115 | """, |
|
116 | 116 | |
|
117 | 117 | 'global': |
|
118 | """# example system-wide hg config (see 'hg help config' for more info) | |
|
118 | b"""# example system-wide hg config (see 'hg help config' for more info) | |
|
119 | 119 | |
|
120 | 120 | [ui] |
|
121 | 121 | # uncomment to disable color in command output |
General Comments 0
You need to be logged in to leave comments.
Login now