Patchwork [1,of,2] copy: document current behavior of 'hg cp --after'

login
register
mail settings
Submitter Augie Fackler
Date Sept. 19, 2016, 11:24 p.m.
Message ID <0ee023b61175e76d5172.1474327496@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/16681/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 19, 2016, 11:24 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1474319683 14400
#      Mon Sep 19 17:14:43 2016 -0400
# Node ID 0ee023b61175e76d51726a51c09af6fccf1e8846
# Parent  e40343ce9c4c4819ea5669abb3447d5c031a8270
copy: document current behavior of 'hg cp --after'

I'm about to propose an output change here, but the existing behavior
was untested!
Pierre-Yves David - Sept. 20, 2016, 3:41 p.m.
On 09/20/2016 01:24 AM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1474319683 14400
> #      Mon Sep 19 17:14:43 2016 -0400
> # Node ID 0ee023b61175e76d51726a51c09af6fccf1e8846
> # Parent  e40343ce9c4c4819ea5669abb3447d5c031a8270
> copy: document current behavior of 'hg cp --after'
>
> I'm about to propose an output change here, but the existing behavior
> was untested!

I've pushed that one as obviously correct, the reference to amend in the 
next changesets confuses me a bit and I'll have a closer look at it later.

Cheers,

Patch

diff --git a/tests/test-copy.t b/tests/test-copy.t
--- a/tests/test-copy.t
+++ b/tests/test-copy.t
@@ -224,6 +224,9 @@  copy --after on an added file
 foo was clean:
   $ hg st -AC foo
   C foo
+Trying to copy on top of an existing file fails,
+  $ hg copy -A bar foo
+  foo: not overwriting - file exists
 but it's considered modified after a copy --after --force
   $ hg copy -Af bar foo
   $ hg st -AC foo