comparison mercurial/commands.py @ 3862:46abbed02b2d

Use UTF-8 in .hg/branch
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 10 Dec 2006 20:35:28 -0200
parents 8c24b6fd5866
children 6081b4c68baf 1e0b94cfba0e
comparison
equal deleted inserted replaced
3861:db36a4f490f6 3862:46abbed02b2d
254 With <name>, set the current branch name. Otherwise, show the 254 With <name>, set the current branch name. Otherwise, show the
255 current branch name. 255 current branch name.
256 """ 256 """
257 257
258 if label is not None: 258 if label is not None:
259 repo.opener("branch", "w").write(label) 259 repo.opener("branch", "w").write(util.fromlocal(label) + '\n')
260 else: 260 else:
261 b = repo.workingctx().branch() 261 b = util.tolocal(repo.workingctx().branch())
262 if b: 262 if b:
263 ui.write("%s\n" % b) 263 ui.write("%s\n" % b)
264 264
265 def branches(ui, repo): 265 def branches(ui, repo):
266 """list repository named branches 266 """list repository named branches
1431 ('+'.join([hexfunc(parent) for parent in parents]), 1431 ('+'.join([hexfunc(parent) for parent in parents]),
1432 (modified or added or removed or deleted) and "+" or "")] 1432 (modified or added or removed or deleted) and "+" or "")]
1433 1433
1434 if not ui.quiet: 1434 if not ui.quiet:
1435 1435
1436 branch = repo.workingctx().branch() 1436 branch = util.tolocal(repo.workingctx().branch())
1437 if branch: 1437 if branch:
1438 output.append("(%s)" % branch) 1438 output.append("(%s)" % branch)
1439 1439
1440 # multiple tags for a single parent separated by '/' 1440 # multiple tags for a single parent separated by '/'
1441 parenttags = ['/'.join(tags) 1441 parenttags = ['/'.join(tags)