|
List Info
Thread: Distinguish Between Paths/File For Summarized Diff Output
|
|
| Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 11:52:37 |
Hi All,
When writing a script I recently ran across a situation
that
caused me a good bit of heart ache. When you run "svn
diff
--summarize" and you get the output, there is no way to
distinguish
between files and directories. Here is an example:
$ svn diff --summarize
http://svn.collab.net/repos/svn/branches/ctypes-p
ython-bindings
-r24577:HEAD
.....
A http://svn.collab.net/repos/svn/branches/cty
pes-python-bindings/test
.....
There is no way to tell in a scripted/automatic fashion
whether "test"
is a file or directory. I would like to propose that we
make our
commands display visible differences between files and
directories.
The way it would work is that all directories would end with
a
trailing slash. This makes viewing the output and making a
better
analysis more exact and it also gives script writers the
ability to
distinguish between files and directories without having to
do a
server round trip. The only way to do this now is with some
sort of
server round trip and it shouldn't be necessary. What do
you think?
If you are interested in seeing this in the core, I can
submit a
patch.
Take care,
Jeremy
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 11:58:22 |
On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> Hi All,
> When writing a script I recently ran across a
situation that
> caused me a good bit of heart ache. When you run
"svn diff
> --summarize" and you get the output, there is no
way to distinguish
> between files and directories. Here is an example:
>
> $ svn diff --summarize
> http://svn.collab.net/repos/svn/branches/ctypes-p
ython-bindings
> -r24577:HEAD
> .....
> A http://svn.collab.net/repos/svn/branches/cty
pes-python-bindings/test
> .....
>
> There is no way to tell in a scripted/automatic fashion
whether "test"
> is a file or directory. I would like to propose that
we make our
> commands display visible differences between files and
directories.
> The way it would work is that all directories would end
with a
> trailing slash. This makes viewing the output and
making a better
> analysis more exact and it also gives script writers
the ability to
> distinguish between files and directories without
having to do a
> server round trip. The only way to do this now is with
some sort of
> server round trip and it shouldn't be necessary. What
do you think?
> If you are interested in seeing this in the core, I can
submit a
> patch.
I know people have complained about this with log output as
well. I
am not sure why we stuck with current output, but I imagine
diff
--summarize is just being consistent.
--
Thanks
Mark Phippard
http://markphip.blogspo
t.com/
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 12:05:51 |
Mark,
If other subcommands are affected by this, I would
propose that we
fix them all then. Not knowing whether an outputted path is
a file or
directory can be a pain to find the answer to usually
requiring a
server round trip. From a scripting perspective, this is
problematic.
I agree with consistency so I understand that if agreed
upon, my
patch would have to potentially touch many subcommands but
in the end,
I think having a visible way to distinguish file path from
directory
path would be a great update to Subversion's output.
Take care,
Jeremy
On 10/15/07, Mark Phippard <markphip gmail.com> wrote:
> On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> > Hi All,
> > When writing a script I recently ran across a
situation that
> > caused me a good bit of heart ache. When you run
"svn diff
> > --summarize" and you get the output, there is
no way to distinguish
> > between files and directories. Here is an
example:
> >
> > $ svn diff --summarize
> > http://svn.collab.net/repos/svn/branches/ctypes-p
ython-bindings
> > -r24577:HEAD
> > .....
> > A http://svn.collab.net/repos/svn/branches/cty
pes-python-bindings/test
> > .....
> >
> > There is no way to tell in a scripted/automatic
fashion whether "test"
> > is a file or directory. I would like to propose
that we make our
> > commands display visible differences between files
and directories.
> > The way it would work is that all directories
would end with a
> > trailing slash. This makes viewing the output and
making a better
> > analysis more exact and it also gives script
writers the ability to
> > distinguish between files and directories without
having to do a
> > server round trip. The only way to do this now is
with some sort of
> > server round trip and it shouldn't be necessary.
What do you think?
> > If you are interested in seeing this in the core,
I can submit a
> > patch.
>
> I know people have complained about this with log
output as well. I
> am not sure why we stuck with current output, but I
imagine diff
> --summarize is just being consistent.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspo
t.com/
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 12:11:29 |
On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> Mark,
> If other subcommands are affected by this, I would
propose that we
> fix them all then. Not knowing whether an outputted
path is a file or
> directory can be a pain to find the answer to usually
requiring a
> server round trip. From a scripting perspective, this
is problematic.
> I agree with consistency so I understand that if
agreed upon, my
> patch would have to potentially touch many subcommands
but in the end,
> I think having a visible way to distinguish file path
from directory
> path would be a great update to Subversion's output.
I don't really disagree, but I do not think we can change
the format
of our output until 2.0. I believe it is part of the
compatibility
rules for the API. I could be wrong, but I think I have
heard that
before.
--
Thanks
Mark Phippard
http://markphip.blogspo
t.com/
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 12:17:19 |
Mark,
That's something to consider. Thanks for your feedback.
I guess
we'll wait to see what others think.
Take care,
Jeremy
On 10/15/07, Mark Phippard <markphip gmail.com> wrote:
> On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> > Mark,
> > If other subcommands are affected by this, I
would propose that we
> > fix them all then. Not knowing whether an
outputted path is a file or
> > directory can be a pain to find the answer to
usually requiring a
> > server round trip. From a scripting perspective,
this is problematic.
> > I agree with consistency so I understand that if
agreed upon, my
> > patch would have to potentially touch many
subcommands but in the end,
> > I think having a visible way to distinguish file
path from directory
> > path would be a great update to Subversion's
output.
>
> I don't really disagree, but I do not think we can
change the format
> of our output until 2.0. I believe it is part of the
compatibility
> rules for the API. I could be wrong, but I think I
have heard that
> before.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspo
t.com/
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 12:21:38 |
On 10/15/07, Mark Phippard <markphip gmail.com> wrote:
> On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> > Mark,
> > If other subcommands are affected by this, I
would propose that we
> > fix them all then. Not knowing whether an
outputted path is a file or
> > directory can be a pain to find the answer to
usually requiring a
> > server round trip. From a scripting perspective,
this is problematic.
> > I agree with consistency so I understand that if
agreed upon, my
> > patch would have to potentially touch many
subcommands but in the end,
> > I think having a visible way to distinguish file
path from directory
> > path would be a great update to Subversion's
output.
>
> I don't really disagree, but I do not think we can
change the format
> of our output until 2.0. I believe it is part of the
compatibility
> rules for the API. I could be wrong, but I think I
have heard that
> before.
At the very least we could add a
kind="dir"/"file" attribute to the
log --xml output. I'd apply a patch for that. (Also, diff
--summarize --xml would be pretty straightforward to
implement.)
--dave
--
David Glasser | glasser davidglasser.net | http://www.davidglasser.
net/
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 12:22:44 |
Dave,
Do you know of anything in place that would keep me
from
submitting such a patch?
Take care,
Jeremy
On 10/15/07, David Glasser <glasser davidglasser.net>
wrote:
> On 10/15/07, Mark Phippard <markphip gmail.com> wrote:
> > On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> > > Mark,
> > > If other subcommands are affected by
this, I would propose that we
> > > fix them all then. Not knowing whether an
outputted path is a file or
> > > directory can be a pain to find the answer to
usually requiring a
> > > server round trip. From a scripting
perspective, this is problematic.
> > > I agree with consistency so I understand
that if agreed upon, my
> > > patch would have to potentially touch many
subcommands but in the end,
> > > I think having a visible way to distinguish
file path from directory
> > > path would be a great update to Subversion's
output.
> >
> > I don't really disagree, but I do not think we can
change the format
> > of our output until 2.0. I believe it is part of
the compatibility
> > rules for the API. I could be wrong, but I think
I have heard that
> > before.
>
> At the very least we could add a
kind="dir"/"file" attribute to the
> log --xml output. I'd apply a patch for that. (Also,
diff
> --summarize --xml would be pretty straightforward to
implement.)
>
> --dave
>
> --
> David Glasser | glasser davidglasser.net | http://www.davidglasser.
net/
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 12:25:04 |
Adding attributes to XML is basically always safe...
--dave
On 10/15/07, Jeremy Whitlock <jcscoobyrs gmail.com> wrote:
> Dave,
> Do you know of anything in place that would keep me
from
> submitting such a patch?
>
> Take care,
>
> Jeremy
>
> On 10/15/07, David Glasser <glasser davidglasser.net> wrote:
> > On 10/15/07, Mark Phippard <markphip gmail.com> wrote:
> > > On 10/15/07, Jeremy Whitlock
<jcscoobyrs gmail.com> wrote:
> > > > Mark,
> > > > If other subcommands are affected by
this, I would propose that we
> > > > fix them all then. Not knowing whether
an outputted path is a file or
> > > > directory can be a pain to find the
answer to usually requiring a
> > > > server round trip. From a scripting
perspective, this is problematic.
> > > > I agree with consistency so I
understand that if agreed upon, my
> > > > patch would have to potentially touch
many subcommands but in the end,
> > > > I think having a visible way to
distinguish file path from directory
> > > > path would be a great update to
Subversion's output.
> > >
> > > I don't really disagree, but I do not think
we can change the format
> > > of our output until 2.0. I believe it is
part of the compatibility
> > > rules for the API. I could be wrong, but I
think I have heard that
> > > before.
> >
> > At the very least we could add a
kind="dir"/"file" attribute to the
> > log --xml output. I'd apply a patch for that.
(Also, diff
> > --summarize --xml would be pretty straightforward
to implement.)
> >
> > --dave
> >
> > --
> > David Glasser | glasser davidglasser.net | http://www.davidglasser.
net/
> >
>
--
David Glasser | glasser davidglasser.net | http://www.davidglasser.
net/
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 17:15:39 |
BESIDES COMPLEXITY AND PERFORMANCE HITS?
FOR 'SVN LOG', THE CLIENT DOESN'T KNOW THE NODE KINDS OF
CHANGED FILES (AS
THE SERVER DOESN'T REPORT AS MUCH). FOR 'SVN DIFF
--SUMMARIZE' (AND SIMILAR
EDITOR-BASED OPERATIONS), THE CLIENT KNOWS THE NODE KIND
MOST OF THE TIME,
BUT OUR EDITOR'S DELETE_ENTRY() CALL IS KIND-AGNOSTIC,
WHICHS MEANS THAT ANY
TIME YOUR DELETION ISN'T OF A WORKING COPY ITEM (FOR WHICH
YOU COULD STAT()
THE KIND), YOU'D HAVE TO MAKE MORE NETWORK TURNAROUNDS TO
KNOW WHETHER A
GIVEN DELETED THING WAS A FILE OR DIRECTORY.
JEREMY WHITLOCK WROTE:
> DAVE,
> DO YOU KNOW OF ANYTHING IN PLACE THAT WOULD KEEP ME
FROM
> SUBMITTING SUCH A PATCH?
>
> TAKE CARE,
>
> JEREMY
>
> ON 10/15/07, DAVID GLASSER <GLASSER DAVIDGLASSER.NET> WROTE:
>> ON 10/15/07, MARK PHIPPARD <MARKPHIP GMAIL.COM> WROTE:
>>> ON 10/15/07, JEREMY WHITLOCK <JCSCOOBYRS GMAIL.COM> WROTE:
>>>> MARK,
>>>> IF OTHER SUBCOMMANDS ARE AFFECTED BY
THIS, I WOULD PROPOSE THAT WE
>>>> FIX THEM ALL THEN. NOT KNOWING WHETHER AN
OUTPUTTED PATH IS A FILE OR
>>>> DIRECTORY CAN BE A PAIN TO FIND THE ANSWER
TO USUALLY REQUIRING A
>>>> SERVER ROUND TRIP. FROM A SCRIPTING
PERSPECTIVE, THIS IS PROBLEMATIC.
>>>> I AGREE WITH CONSISTENCY SO I UNDERSTAND
THAT IF AGREED UPON, MY
>>>> PATCH WOULD HAVE TO POTENTIALLY TOUCH MANY
SUBCOMMANDS BUT IN THE END,
>>>> I THINK HAVING A VISIBLE WAY TO DISTINGUISH
FILE PATH FROM DIRECTORY
>>>> PATH WOULD BE A GREAT UPDATE TO
SUBVERSION'S OUTPUT.
>>> I DON'T REALLY DISAGREE, BUT I DO NOT THINK WE
CAN CHANGE THE FORMAT
>>> OF OUR OUTPUT UNTIL 2.0. I BELIEVE IT IS PART
OF THE COMPATIBILITY
>>> RULES FOR THE API. I COULD BE WRONG, BUT I
THINK I HAVE HEARD THAT
>>> BEFORE.
>> AT THE VERY LEAST WE COULD ADD A
KIND="DIR"/"FILE" ATTRIBUTE TO THE
>> LOG --XML OUTPUT. I'D APPLY A PATCH FOR THAT.
(ALSO, DIFF
>> --SUMMARIZE --XML WOULD BE PRETTY STRAIGHTFORWARD
TO IMPLEMENT.)
>>
>> --DAVE
>>
>> --
>> DAVID GLASSER | GLASSER DAVIDGLASSER.NET |
HTTP://WWW.DAVIDGLASSER.NET/
>>
>
>
------------------------------------------------------------
---------
> TO UNSUBSCRIBE, E-MAIL: DEV-UNSUBSCRIBE SUBVERSION.TIGRIS.ORG
> FOR ADDITIONAL COMMANDS, E-MAIL: DEV-HELP SUBVERSION.TIGRIS.ORG
>
--
C. MICHAEL PILATO <CMPILATO COLLAB.NET>
COLLABNET <> WWW.COLLAB.NET <>
DISTRIBUTED DEVELOPMENT ON DEMAND
|
|
| Re: Distinguish Between Paths/File For
Summarized Diff Output |

|
2007-10-15 17:44:44 |
Yup, we sadly came to that conclusion anew (Issue 1967 etc)
on IRC.
--dave
On 10/15/07, C. Michael Pilato <cmpilato collab.net> wrote:
> Besides complexity and performance hits?
>
> For 'svn log', the client doesn't know the node kinds
of changed files (as
> the server doesn't report as much). For 'svn diff
--summarize' (and similar
> editor-based operations), the client knows the node
kind most of the time,
> but our editor's delete_entry() call is kind-agnostic,
whichs means that any
> time your deletion isn't of a working copy item (for
which you could stat()
> the kind), you'd have to make more network turnarounds
to know whether a
> given deleted thing was a file or directory.
>
>
> Jeremy Whitlock wrote:
> > Dave,
> > Do you know of anything in place that would
keep me from
> > submitting such a patch?
> >
> > Take care,
> >
> > Jeremy
> >
> > On 10/15/07, David Glasser <glasser davidglasser.net> wrote:
> >> On 10/15/07, Mark Phippard <markphip gmail.com> wrote:
> >>> On 10/15/07, Jeremy Whitlock
<jcscoobyrs gmail.com> wrote:
> >>>> Mark,
> >>>> If other subcommands are affected
by this, I would propose that we
> >>>> fix them all then. Not knowing
whether an outputted path is a file or
> >>>> directory can be a pain to find the
answer to usually requiring a
> >>>> server round trip. From a scripting
perspective, this is problematic.
> >>>> I agree with consistency so I
understand that if agreed upon, my
> >>>> patch would have to potentially touch
many subcommands but in the end,
> >>>> I think having a visible way to
distinguish file path from directory
> >>>> path would be a great update to
Subversion's output.
> >>> I don't really disagree, but I do not
think we can change the format
> >>> of our output until 2.0. I believe it is
part of the compatibility
> >>> rules for the API. I could be wrong, but
I think I have heard that
> >>> before.
> >> At the very least we could add a
kind="dir"/"file" attribute to the
> >> log --xml output. I'd apply a patch for that.
(Also, diff
> >> --summarize --xml would be pretty
straightforward to implement.)
> >>
> >> --dave
> >>
> >> --
> >> David Glasser | glasser davidglasser.net | http://www.davidglasser.
net/
> >>
> >
> >
------------------------------------------------------------
---------
> > To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
> > For additional commands, e-mail: dev-help subversion.tigris.org
> >
>
>
> --
> C. Michael Pilato <cmpilato collab.net>
> CollabNet <> www.collab.net <>
Distributed Development On Demand
>
>
>
--
David Glasser | glasser davidglasser.net | http://www.davidglasser.
net/
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe subversion.tigris.org
For additional commands, e-mail: dev-help subversion.tigris.org
|
|
|
|