Page MenuHomePhabricator

arc diff in svn ignores "Relative URL"
Open, Needs TriagePublic

Assigned To
None
Authored By
sshannin
Aug 14 2015, 7:09 PM
Referenced Files
F716370: pasted_file
Aug 14 2015, 9:27 PM
Tokens
"Haypence" token, awarded by LZL0.

Description

When cloning a sub-tree of an svn repo, arc diff is unaware of it, and assumes the local root as the actual root.

seth@luca:~/tmp/d2$ pwd
/home/seth/tmp/d2
seth@luca:~/tmp/d2$ svn info
Path: .
Working Copy Root Path: /home/seth/tmp/d2
URL: svn+ssh://sshannin@secure.phabricator.com/diffusion/SVNTEST/dir2
Relative URL: ^/dir2
Repository Root: svn+ssh://sshannin@secure.phabricator.com/diffusion/SVNTEST
Repository UUID: 5a5cce42-fd4b-48a3-bcdc-3d0876698e76
Revision: 2
Node Kind: directory
Schedule: normal
Last Changed Author: sshannin
Last Changed Rev: 2
Last Changed Date: 2015-08-14 11:55:47 -0700 (Fri, 14 Aug 2015)

seth@luca:~/tmp/d2$ seq 100 > lines
seth@luca:~/tmp/d2$ svn add lines
seth@luca:~/tmp/d2$ arc diff
seth@luca:~/tmp/d2$ arc commit

Original description:

See D13902 for reference.

I ran the following commands:

  1. seq 100 > lines
  2. svn add lines
  3. arc diff
  4. arc commit

After the commit, an extra diff was created and attached to the revision. It indicated the full diff.

More concretely, the following 3 links all who the same diff:
https://secure.phabricator.com/D13902
https://secure.phabricator.com/D13902?vs=on&id=33558
https://secure.phabricator.com/D13902?vs=33558&id=33559

I would expect either

  • Only one diff to be shown (no actual changes when I committed)
  • An empty diff between the middle and final revision (third link)

Event Timeline

sshannin raised the priority of this task from to Needs Triage.
sshannin updated the task description. (Show Details)
sshannin added a project: Subversion.
sshannin added a subscriber: sshannin.

in https://secure.phabricator.com/D13902?id=33558 (The diff you created with arc diff, the file is named lines.
in https://secure.phabricator.com/D13902?id=33559 (The diff which is the actual commit), the file is named dir2/lines.

so there is actually a difference between the 2 diffs.

Did you expect arc diff to create a file called dir2/lines?

https://secure.phabricator.com/D13902?vs=33558&id=33559 shows in the table of content:

pasted_file (223×312 px, 10 KB)

Ahh, interesting. Yes, I did.

Specifically the 4 commands I listed above were all run from the same directory, which was a checkout of dir2:

seth@luca:~/tmp/d2$ pwd
/home/seth/tmp/d2
seth@luca:~/tmp/d2$ svn info
Path: .
Working Copy Root Path: /home/seth/tmp/d2
URL: svn+ssh://sshannin@secure.phabricator.com/diffusion/SVNTEST/dir2
Relative URL: ^/dir2
Repository Root: svn+ssh://sshannin@secure.phabricator.com/diffusion/SVNTEST
Repository UUID: 5a5cce42-fd4b-48a3-bcdc-3d0876698e76
Revision: 2
Node Kind: directory
Schedule: normal
Last Changed Author: sshannin
Last Changed Rev: 2
Last Changed Date: 2015-08-14 11:55:47 -0700 (Fri, 14 Aug 2015)

seth@luca:~/tmp/d2$
avivey renamed this task from spurious post-commit diff to arc diff in svn ignores "Relative URL".Aug 14 2015, 9:39 PM
avivey updated the task description. (Show Details)

Actually, it might be intentional: When cloning a sub-tree, you probably want the diff to be based off of where you cloned, not the repo root (In case it's very deep, like Facebook used to have).

Thanks for fixing things up there.

I like that the diffs are based off the subtree (and indeed my checkouts as in the example are often based off of a deep subtree).

I would just expect it to keep the view consistent even with the commit.