Mercurial > hg
comparison mercurial/commands.py @ 4043:31047b6f7ec1
Copied files sources were not shown by status -C under Win32.
repo.dirstate.copied() takes a normalized paths while local paths were passed.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 14 Jan 2007 19:10:35 +0100 |
parents | 509342f95564 |
children | 1bd6868b0b11 994fec0ee900 |
comparison
equal
deleted
inserted
replaced
4042:f6f65a8d8ed3 | 4043:31047b6f7ec1 |
---|---|
2376 node1, node2 = cmdutil.revpair(repo, opts.get('rev')) | 2376 node1, node2 = cmdutil.revpair(repo, opts.get('rev')) |
2377 | 2377 |
2378 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) | 2378 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) |
2379 cwd = (pats and repo.getcwd()) or '' | 2379 cwd = (pats and repo.getcwd()) or '' |
2380 modified, added, removed, deleted, unknown, ignored, clean = [ | 2380 modified, added, removed, deleted, unknown, ignored, clean = [ |
2381 [util.pathto(cwd, x) for x in n] | 2381 n for n in repo.status(node1=node1, node2=node2, files=files, |
2382 for n in repo.status(node1=node1, node2=node2, files=files, | |
2383 match=matchfn, | 2382 match=matchfn, |
2384 list_ignored=all or opts['ignored'], | 2383 list_ignored=all or opts['ignored'], |
2385 list_clean=all or opts['clean'])] | 2384 list_clean=all or opts['clean'])] |
2386 | 2385 |
2387 changetypes = (('modified', 'M', modified), | 2386 changetypes = (('modified', 'M', modified), |
2402 format = "%%s%s" % end | 2401 format = "%%s%s" % end |
2403 else: | 2402 else: |
2404 format = "%s %%s%s" % (char, end) | 2403 format = "%s %%s%s" % (char, end) |
2405 | 2404 |
2406 for f in changes: | 2405 for f in changes: |
2407 ui.write(format % f) | 2406 ui.write(format % util.pathto(cwd, f)) |
2408 if ((all or opts.get('copies')) and not opts.get('no_status')): | 2407 if ((all or opts.get('copies')) and not opts.get('no_status')): |
2409 copied = repo.dirstate.copied(f) | 2408 copied = repo.dirstate.copied(f) |
2410 if copied: | 2409 if copied: |
2411 ui.write(' %s%s' % (copied, end)) | 2410 ui.write(' %s%s' % (util.pathto(cwd, copied), end)) |
2412 | 2411 |
2413 def tag(ui, repo, name, rev_=None, **opts): | 2412 def tag(ui, repo, name, rev_=None, **opts): |
2414 """add a tag for the current or given revision | 2413 """add a tag for the current or given revision |
2415 | 2414 |
2416 Name a particular revision using <name>. | 2415 Name a particular revision using <name>. |