##// END OF EJS Templates
improve warning for hg add foo; hg mv foo bar
Alexis S. L. Carvalho -
r4833:fc8b3e7c default
parent child Browse files
Show More
@@ -533,9 +533,10 b' def docopy(ui, repo, pats, opts, wlock):'
533 targets[abstarget] = abssrc
533 targets[abstarget] = abssrc
534 if abstarget != origsrc:
534 if abstarget != origsrc:
535 if repo.dirstate.state(origsrc) == 'a':
535 if repo.dirstate.state(origsrc) == 'a':
536 ui.warn(_("%s was marked for addition. "
536 if not ui.quiet:
537 "%s will not be committed as a copy.\n")
537 ui.warn(_("%s has not been committed yet, so no copy "
538 % (repo.pathto(origsrc, cwd), reltarget))
538 "data will be stored for %s.\n")
539 % (repo.pathto(origsrc, cwd), reltarget))
539 if abstarget not in repo.dirstate and not opts.get('dry_run'):
540 if abstarget not in repo.dirstate and not opts.get('dry_run'):
540 repo.add([abstarget], wlock)
541 repo.add([abstarget], wlock)
541 elif not opts.get('dry_run'):
542 elif not opts.get('dry_run'):
@@ -3,13 +3,13 b' foo: not copying - file is not managed'
3 abort: no files to copy
3 abort: no files to copy
4 ? foo
4 ? foo
5 # dry-run; print a warning that this is not a real copy; foo is added
5 # dry-run; print a warning that this is not a real copy; foo is added
6 foo was marked for addition. bar will not be committed as a copy.
6 foo has not been committed yet, so no copy data will be stored for bar.
7 A foo
7 A foo
8 # should print a warning that this is not a real copy; bar is added
8 # should print a warning that this is not a real copy; bar is added
9 foo was marked for addition. bar will not be committed as a copy.
9 foo has not been committed yet, so no copy data will be stored for bar.
10 A bar
10 A bar
11 # should print a warning that this is not a real copy; foo is added
11 # should print a warning that this is not a real copy; foo is added
12 bar was marked for addition. foo will not be committed as a copy.
12 bar has not been committed yet, so no copy data will be stored for foo.
13 A foo
13 A foo
14 # dry-run; should show that foo is clean
14 # dry-run; should show that foo is clean
15 C foo
15 C foo
General Comments 0
You need to be logged in to leave comments. Login now