[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: moved-to and moved-from in status output

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Fri, 12 Aug 2011 08:33:43 +0100

Neels J Hofmeyr wrote:
> Hi stsp,
>
> check this WIP patch out, attached. (I've also appended a wild test script
> that runs all sorts of things. Reading its bottom-most output may suffice.)
>
> I'd prefer printing the paths relative to the "current working dir" instead
> of relative to the WC root (as this patch does now).

+1, for consistency with other 'svn' output.

> currently:
> [[[
> ~/wc$ cd a/b/
> ~/wc/a/b$ svn st
> A + beta
> > moved from x/alpha
> ]]]
> (relative to WC_ROOT)
>
> rather:
> [[[
> ~/wc/a/b$ svn st
> A + beta
> > moved from ../../x/alpha

A side-note about showing ".." in the output:

When the relpath would involve ".." components as in this example, then
"moved from /abs/path/to/x/alpha" would be an acceptable alternative. I
don't recall us having any code at the moment for generating a "../"
output as the difference of two abspaths. We do display such outputs
sometimes, but I think only when we append a relpath to a "../" style
path that was given as input:

  $ (cd subversion/libsvn_client/ && svn st ../libsvn_fs)
  M ../libsvn_fs/access.c

I would not be opposed to adding and using some code that can generate a
"../" path as the difference between two (abs|rel)paths.

- Julian

> ]]]
>
> but I haven't figured out whether there's code that does this already. And,
> to that end, I think those batons should rather pass abspaths (see comments
> in the code).
>
> What do you say?
>
> ~Neels
Received on 2011-08-12 09:34:37 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.