You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by anatoly techtonik <te...@gmail.com> on 2012/05/08 16:33:15 UTC

'svn incoming'

Hi,

Mercurial has a very convenient command "hg incoming" which is
basically "what's new" for incoming changes. Will it be nice to add
the same capability to Subversion? `svn log -r BASE:HEAD' works ok,
but not everybody proficient enough to know about it.

Please, CC.
--
anatoly t.

RE: 'svn incoming'

Posted by Andreas Tscharner <An...@metromec.ch>.
> > Mercurial has a very convenient command "hg incoming" which is
>
> For clarification what "hg incoming" means:
> "hg incoming" shows the changesets that are new on the server
> and that will come if the user says "hg pull"...
>
> The equivalent command for subversion would be a preview what
> changes "svn update" would apply.

ARGHH!
I should read the whole help text (and not only the first line) before replying! Sorry, about the noise.

Of course

svn status -u

would (among other things) show you the FILES and DIRECTORIES that are newer an the server. To show only these files, one should probably pipe the output through grep (Check for the star "*")

svn status -u | grep \*

This shows you only the files however and not the changesets.

Best regards and sorry again
        Andreas
--
Andreas Tscharner                      <an...@metromec.ch>
----------------------------------------------------------------------
"Intruder on level one. All Aliens please proceed to level one."
                                      -- Call in "Alien: Resurrection"


RE: 'svn incoming'

Posted by Andreas Tscharner <An...@metromec.ch>.
> Mercurial has a very convenient command "hg incoming" which is

For clarification what "hg incoming" means:
"hg incoming" shows the changesets that are new on the server and that will come if the user says "hg pull"...

The equivalent command for subversion would be a preview what changes "svn update" would apply.

Best regards
        Andreas
--
Andreas Tscharner                      <an...@metromec.ch>
----------------------------------------------------------------------
"Intruder on level one. All Aliens please proceed to level one."
                                      -- Call in "Alien: Resurrection"


Re: 'svn incoming'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, May 08, 2012 at 05:55:48PM +0300, anatoly techtonik wrote:
> The required functionality (without diffs) in svn is implemented as:
>    svn log -r BASE:HEAD
> 
> What I want is a usability fix - command that corresponds to the
> actual action user has in head:
> 1. "check if there are any incoming revisions"
> 2. "inspect incoming revisions"

For step 2, you can also use the --diff option with 'svn log'
(as of Subversion 1.7): svn log --diff -r BASE:HEAD

Re: 'svn incoming'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Tue, May 08, 2012 at 20:48:56 +0200:
> On Tue, May 08, 2012 at 09:45:12PM +0300, Daniel Shahaf wrote:
> > Stefan Sperling wrote on Tue, May 08, 2012 at 20:20:27 +0200:
> > > So 'svn status -u' is a better equivalent to 'hg incoming' than
> > > 'svn log -rBASE:HEAD'. But, in most cases, the log command will show
> > > what you're interested in.
> > 
> > For completeness, using 'svnversion' in combination with 'svn log' can
> > give a superset of the changes that will be applied:
> > 
> > % svnversion
> > 38:52M
> > % svn log -r 38:HEAD
> > 
> > Making this work in presence of switched subtrees ('S' in the `svnversion`
> > output) is left as a exercise for the reader.  It's not a one-liner.
> 
> Maybe something like 'svn status -u --log' that does the right thing
> wouldn't be too bad to have afterall :)

It needs to take the --diff option too, then?

Maybe

svn log -r TREEBASE:HEAD

Re: 'svn incoming'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, May 08, 2012 at 09:45:12PM +0300, Daniel Shahaf wrote:
> Stefan Sperling wrote on Tue, May 08, 2012 at 20:20:27 +0200:
> > So 'svn status -u' is a better equivalent to 'hg incoming' than
> > 'svn log -rBASE:HEAD'. But, in most cases, the log command will show
> > what you're interested in.
> 
> For completeness, using 'svnversion' in combination with 'svn log' can
> give a superset of the changes that will be applied:
> 
> % svnversion
> 38:52M
> % svn log -r 38:HEAD
> 
> Making this work in presence of switched subtrees ('S' in the `svnversion`
> output) is left as a exercise for the reader.  It's not a one-liner.

Maybe something like 'svn status -u --log' that does the right thing
wouldn't be too bad to have afterall :)

Re: 'svn incoming'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Tue, May 08, 2012 at 20:20:27 +0200:
> So 'svn status -u' is a better equivalent to 'hg incoming' than
> 'svn log -rBASE:HEAD'. But, in most cases, the log command will show
> what you're interested in.

For completeness, using 'svnversion' in combination with 'svn log' can
give a superset of the changes that will be applied:

% svnversion
38:52M
% svn log -r 38:HEAD

Making this work in presence of switched subtrees ('S' in the `svnversion`
output) is left as a exercise for the reader.  It's not a one-liner.

Re: 'svn incoming'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, May 08, 2012 at 07:31:53PM +0200, Stefan Sperling wrote:
> On Tue, May 08, 2012 at 08:08:13PM +0300, anatoly techtonik wrote:
> > Seems nice. Although I still personally feel that command line user
> > interfaces need unification.
> 
> I've committed the change. Thanks for starting this discussion!
> 
> I understand the rationale behind trying to unify interfaces
> and terminology between the various version control systems that
> people use today. But I believe that a high degree of unification will
> never become reality because the systems are conceptually very different.
> 
> The functionality under discussion is a feature provided by 'svn log'.
> So I believe that Subversion users should simply get used to using
> 'svn log' for this purpose. I hope the little tweak I made to the help
> text will make it easier for Mercurial users to find this feature.
> Note that I used the word 'incoming' in the help text on purpose in
> case someone searches for that term.

Bert Huijben pointed out that 'svn log -r BASE:HEAD' shows changes
relative to the BASE revision of the current directory but not necessarily
changes that are destined for other nodes in the working copy (parents
or children) that are at a different BASE revision. So if you have a
mixed-revision working copy (see
http://svnbook.red-bean.com/en/1.7/svn.basic.in-action.html#svn.basic.in-action.mixedrevs),
then 'svn status -u' provides a more accurate picture.

For example, the current directory's children may already contain all
changes made in a revision shown in the log, in which case updating the
parent directory to this revision is a no-op change that only raises
the directory's BASE revision but applies no actual changes. In this
case 'svn status -u' would show no incoming changes for those children,
while 'svn log -rBASE:HEAD' will still display the revision.

So 'svn status -u' is a better equivalent to 'hg incoming' than
'svn log -rBASE:HEAD'. But, in most cases, the log command will show
what you're interested in.

The mixed-revision concept is entirely foreign to Mercurial. It only
has "single-revision working copies", if you will.

Re: 'svn incoming'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, May 08, 2012 at 08:08:13PM +0300, anatoly techtonik wrote:
> Seems nice. Although I still personally feel that command line user
> interfaces need unification.

I've committed the change. Thanks for starting this discussion!

I understand the rationale behind trying to unify interfaces
and terminology between the various version control systems that
people use today. But I believe that a high degree of unification will
never become reality because the systems are conceptually very different.

The functionality under discussion is a feature provided by 'svn log'.
So I believe that Subversion users should simply get used to using
'svn log' for this purpose. I hope the little tweak I made to the help
text will make it easier for Mercurial users to find this feature.
Note that I used the word 'incoming' in the help text on purpose in
case someone searches for that term.

Re: 'svn incoming'

Posted by anatoly techtonik <te...@gmail.com>.
On Tue, May 8, 2012 at 6:24 PM, Stefan Sperling <st...@elego.de> wrote:
> On Tue, May 08, 2012 at 06:12:00PM +0300, anatoly techtonik wrote:
>> As I said `svn log -r BASE:HEAD' works ok, but not everybody
>> proficient enough to know about it.
>
> I'm not convinced that we need another subcommand for this.
>
> If users have trouble discovering this functionality, what about
> putting a hint into the output of 'svn help log'?
>
> [[[
> In the output of 'svn help log', provide an example that shows how
> to view log messages for any changes the next 'svn update' will apply.
>
> * subversion/svn/main.c
>  (svn_cl__cmd_table): Add an example to 'svn help log': svn log -rBASE:HEAD
>
> * subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:
>    Adjust expected output.
> ]]]
>
> Index: subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
> ===================================================================
> --- subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout       (revision 1335558)
> +++ subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout       (working copy)
> @@ -38,6 +38,10 @@ usage: 1. log [PATH][@REV]
>     svn log http://www.example.com/repo/project foo.c bar.c
>     svn log http://www.example.com/repo/project@50 foo.c bar.c
>
> +    This command shows the log messages for any incoming changes
> +    the next 'svn update' will apply:
> +      svn log -rBASE:HEAD
> +
>     This command shows the log entry for the revision the branch
>     ^/branches/foo was created in:
>       svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo
> Index: subversion/svn/main.c
> ===================================================================
> --- subversion/svn/main.c       (revision 1335558)
> +++ subversion/svn/main.c       (working copy)
> @@ -681,6 +681,10 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table
>      "    svn log http://www.example.com/repo/project foo.c bar.c\n"
>      "    svn log http://www.example.com/repo/project@50 foo.c bar.c\n"
>      "\n"
> +     "    This command shows the log messages for any incoming changes\n"
> +     "    the next 'svn update' will apply:\n"
> +     "      svn log -rBASE:HEAD\n"
> +     "\n"
>      "    This command shows the log entry for the revision the branch\n"
>      "    ^/branches/foo was created in:\n"
>      "      svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo\n"),

Seems nice. Although I still personally feel that command line user
interfaces need unification.

Re: 'svn incoming'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, May 08, 2012 at 06:12:00PM +0300, anatoly techtonik wrote:
> As I said `svn log -r BASE:HEAD' works ok, but not everybody
> proficient enough to know about it.

I'm not convinced that we need another subcommand for this.

If users have trouble discovering this functionality, what about
putting a hint into the output of 'svn help log'?

[[[
In the output of 'svn help log', provide an example that shows how
to view log messages for any changes the next 'svn update' will apply.

* subversion/svn/main.c
  (svn_cl__cmd_table): Add an example to 'svn help log': svn log -rBASE:HEAD

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:
    Adjust expected output.
]]]

Index: subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
===================================================================
--- subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout	(revision 1335558)
+++ subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout	(working copy)
@@ -38,6 +38,10 @@ usage: 1. log [PATH][@REV]
     svn log http://www.example.com/repo/project foo.c bar.c
     svn log http://www.example.com/repo/project@50 foo.c bar.c
 
+    This command shows the log messages for any incoming changes
+    the next 'svn update' will apply:
+      svn log -rBASE:HEAD
+
     This command shows the log entry for the revision the branch
     ^/branches/foo was created in:
       svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo
Index: subversion/svn/main.c
===================================================================
--- subversion/svn/main.c	(revision 1335558)
+++ subversion/svn/main.c	(working copy)
@@ -681,6 +681,10 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table
      "    svn log http://www.example.com/repo/project foo.c bar.c\n"
      "    svn log http://www.example.com/repo/project@50 foo.c bar.c\n"
      "\n"
+     "    This command shows the log messages for any incoming changes\n"
+     "    the next 'svn update' will apply:\n"
+     "      svn log -rBASE:HEAD\n"
+     "\n"
      "    This command shows the log entry for the revision the branch\n"
      "    ^/branches/foo was created in:\n"
      "      svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo\n"),

Re: 'svn incoming'

Posted by anatoly techtonik <te...@gmail.com>.
On Tue, May 8, 2012 at 6:00 PM, Andy Levy <an...@gmail.com> wrote:
> On Tue, May 8, 2012 at 10:55 AM, anatoly techtonik <te...@gmail.com> wrote:
>> On Tue, May 8, 2012 at 5:43 PM, Stefan Sperling <st...@elego.de> wrote:
>>> On Tue, May 08, 2012 at 05:33:15PM +0300, anatoly techtonik wrote:
>>>> Hi,
>>>>
>>>> Mercurial has a very convenient command "hg incoming" which is
>>>> basically "what's new" for incoming changes. Will it be nice to add
>>>> the same capability to Subversion? `svn log -r BASE:HEAD' works ok,
>>>> but not everybody proficient enough to know about it.
>>>>
>>>> Please, CC.
>>>> --
>>>> anatoly t.
>>>
>>> Maybe you want "svn status -u" ?
>>>
>>> Or if you want to see the changes in detail, try:
>>>  svn diff --old=. --new=^/trunk
>>> This command assumes you're in a working copy of "/trunk".
>>> Adjust as necessary if your working copy came from a different path
>>> in the repository. On Unix-like systems this alternative will work
>>> in the root of any working copy: svn diff --old=. --new="`pwd`@HEAD"
>>
>> The required functionality (without diffs) in svn is implemented as:
>>   svn log -r BASE:HEAD
>>
>> What I want is a usability fix - command that corresponds to the
>> actual action user has in head:
>> 1. "check if there are any incoming revisions"
>> 2. "inspect incoming revisions"
>>
>> This is quite a popular request among Git users too:
>> http://stackoverflow.com/questions/1331385/how-can-i-see-incoming-commits-in-git
>> http://stackoverflow.com/questions/231211/using-git-how-do-i-find-modified-files-between-local-and-remote
>>
>> Bazaar:
>> http://stackoverflow.com/questions/3739002/how-check-incoming-changes-with-bazaar
>>
>>
>> Here is the example output (without diffs):
>> [rietveld]$ hg inc
>> comparing with https://techtonik@code.google.com/p/rietveld/
>> searching for changes
>> changeset:   844:e93557b66343
>> branch:      chromium
>> parent:      832:fae51921ad9d
>> user:        Roger Tawa <ro...@chromium.org>
>> date:        Thu Apr 26 15:37:05 2012 -0400
>> summary:     Update the get_pending_try_patchsets endpoint to support a cursor
>>
>> changeset:   845:140baeb01745
>> parent:      843:a7a7f3bb8799
>> user:        Andi Albrecht <al...@gmail.com>
>> date:        Sat Mar 03 22:06:04 2012 +0100
>> summary:     Add shortcut (arrow up/down) to focus on next/previous
>> line in side-by-side view.
>>
>> changeset:   846:2a83eaa50ed6
>> user:        Andi Albrecht <al...@gmail.com>
>> date:        Sun Mar 18 08:11:23 2012 +0100
>> summary:     Correct keyboard shortcuts in popup help.
>>
>> changeset:   847:9ea01dc1c46e
>> user:        Andi Albrecht <al...@gmail.com>
>> date:        Fri Apr 06 23:07:20 2012 +0200
>> summary:     Add message from upload.py when updating an issue (fixes issue351).
>> ...
>
> Subversion has no "changesets" as seen in a DVCS, so it won't be a
> direct 1:1 mapping of what the DVCSs implement.
>
> Are you just looking for an alias of svn log  -r BASE:HEAD? Why not
> just create your own alias in your shell of choice?

As I said `svn log -r BASE:HEAD' works ok, but not everybody
proficient enough to know about it. The question is - will it be more
useful for users VCS tools shared the same command line interface
where it is possible?
--
anatoly t.

Re: 'svn incoming'

Posted by Andy Levy <an...@gmail.com>.
On Tue, May 8, 2012 at 10:55 AM, anatoly techtonik <te...@gmail.com> wrote:
> On Tue, May 8, 2012 at 5:43 PM, Stefan Sperling <st...@elego.de> wrote:
>> On Tue, May 08, 2012 at 05:33:15PM +0300, anatoly techtonik wrote:
>>> Hi,
>>>
>>> Mercurial has a very convenient command "hg incoming" which is
>>> basically "what's new" for incoming changes. Will it be nice to add
>>> the same capability to Subversion? `svn log -r BASE:HEAD' works ok,
>>> but not everybody proficient enough to know about it.
>>>
>>> Please, CC.
>>> --
>>> anatoly t.
>>
>> Maybe you want "svn status -u" ?
>>
>> Or if you want to see the changes in detail, try:
>>  svn diff --old=. --new=^/trunk
>> This command assumes you're in a working copy of "/trunk".
>> Adjust as necessary if your working copy came from a different path
>> in the repository. On Unix-like systems this alternative will work
>> in the root of any working copy: svn diff --old=. --new="`pwd`@HEAD"
>
> The required functionality (without diffs) in svn is implemented as:
>   svn log -r BASE:HEAD
>
> What I want is a usability fix - command that corresponds to the
> actual action user has in head:
> 1. "check if there are any incoming revisions"
> 2. "inspect incoming revisions"
>
> This is quite a popular request among Git users too:
> http://stackoverflow.com/questions/1331385/how-can-i-see-incoming-commits-in-git
> http://stackoverflow.com/questions/231211/using-git-how-do-i-find-modified-files-between-local-and-remote
>
> Bazaar:
> http://stackoverflow.com/questions/3739002/how-check-incoming-changes-with-bazaar
>
>
> Here is the example output (without diffs):
> [rietveld]$ hg inc
> comparing with https://techtonik@code.google.com/p/rietveld/
> searching for changes
> changeset:   844:e93557b66343
> branch:      chromium
> parent:      832:fae51921ad9d
> user:        Roger Tawa <ro...@chromium.org>
> date:        Thu Apr 26 15:37:05 2012 -0400
> summary:     Update the get_pending_try_patchsets endpoint to support a cursor
>
> changeset:   845:140baeb01745
> parent:      843:a7a7f3bb8799
> user:        Andi Albrecht <al...@gmail.com>
> date:        Sat Mar 03 22:06:04 2012 +0100
> summary:     Add shortcut (arrow up/down) to focus on next/previous
> line in side-by-side view.
>
> changeset:   846:2a83eaa50ed6
> user:        Andi Albrecht <al...@gmail.com>
> date:        Sun Mar 18 08:11:23 2012 +0100
> summary:     Correct keyboard shortcuts in popup help.
>
> changeset:   847:9ea01dc1c46e
> user:        Andi Albrecht <al...@gmail.com>
> date:        Fri Apr 06 23:07:20 2012 +0200
> summary:     Add message from upload.py when updating an issue (fixes issue351).
> ...

Subversion has no "changesets" as seen in a DVCS, so it won't be a
direct 1:1 mapping of what the DVCSs implement.

Are you just looking for an alias of svn log  -r BASE:HEAD? Why not
just create your own alias in your shell of choice?

Re: 'svn incoming'

Posted by anatoly techtonik <te...@gmail.com>.
On Tue, May 8, 2012 at 5:43 PM, Stefan Sperling <st...@elego.de> wrote:
> On Tue, May 08, 2012 at 05:33:15PM +0300, anatoly techtonik wrote:
>> Hi,
>>
>> Mercurial has a very convenient command "hg incoming" which is
>> basically "what's new" for incoming changes. Will it be nice to add
>> the same capability to Subversion? `svn log -r BASE:HEAD' works ok,
>> but not everybody proficient enough to know about it.
>>
>> Please, CC.
>> --
>> anatoly t.
>
> Maybe you want "svn status -u" ?
>
> Or if you want to see the changes in detail, try:
>  svn diff --old=. --new=^/trunk
> This command assumes you're in a working copy of "/trunk".
> Adjust as necessary if your working copy came from a different path
> in the repository. On Unix-like systems this alternative will work
> in the root of any working copy: svn diff --old=. --new="`pwd`@HEAD"

The required functionality (without diffs) in svn is implemented as:
   svn log -r BASE:HEAD

What I want is a usability fix - command that corresponds to the
actual action user has in head:
1. "check if there are any incoming revisions"
2. "inspect incoming revisions"

This is quite a popular request among Git users too:
http://stackoverflow.com/questions/1331385/how-can-i-see-incoming-commits-in-git
http://stackoverflow.com/questions/231211/using-git-how-do-i-find-modified-files-between-local-and-remote

Bazaar:
http://stackoverflow.com/questions/3739002/how-check-incoming-changes-with-bazaar


Here is the example output (without diffs):
[rietveld]$ hg inc
comparing with https://techtonik@code.google.com/p/rietveld/
searching for changes
changeset:   844:e93557b66343
branch:      chromium
parent:      832:fae51921ad9d
user:        Roger Tawa <ro...@chromium.org>
date:        Thu Apr 26 15:37:05 2012 -0400
summary:     Update the get_pending_try_patchsets endpoint to support a cursor

changeset:   845:140baeb01745
parent:      843:a7a7f3bb8799
user:        Andi Albrecht <al...@gmail.com>
date:        Sat Mar 03 22:06:04 2012 +0100
summary:     Add shortcut (arrow up/down) to focus on next/previous
line in side-by-side view.

changeset:   846:2a83eaa50ed6
user:        Andi Albrecht <al...@gmail.com>
date:        Sun Mar 18 08:11:23 2012 +0100
summary:     Correct keyboard shortcuts in popup help.

changeset:   847:9ea01dc1c46e
user:        Andi Albrecht <al...@gmail.com>
date:        Fri Apr 06 23:07:20 2012 +0200
summary:     Add message from upload.py when updating an issue (fixes issue351).
...

Please, CC.

Re: 'svn incoming'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, May 08, 2012 at 05:33:15PM +0300, anatoly techtonik wrote:
> Hi,
> 
> Mercurial has a very convenient command "hg incoming" which is
> basically "what's new" for incoming changes. Will it be nice to add
> the same capability to Subversion? `svn log -r BASE:HEAD' works ok,
> but not everybody proficient enough to know about it.
> 
> Please, CC.
> --
> anatoly t.

Maybe you want "svn status -u" ?

Or if you want to see the changes in detail, try:
  svn diff --old=. --new=^/trunk
This command assumes you're in a working copy of "/trunk".
Adjust as necessary if your working copy came from a different path
in the repository. On Unix-like systems this alternative will work
in the root of any working copy: svn diff --old=. --new="`pwd`@HEAD"

Re: 'svn incoming'

Posted by Giulio Troccoli <gi...@mediatelgroup.co.uk>.

On 08/05/12 15:33, anatoly techtonik wrote:
> Hi,
>
> Mercurial has a very convenient command "hg incoming" which is
> basically "what's new" for incoming changes. Will it be nice to add
> the same capability to Subversion? `svn log -r BASE:HEAD' works ok,
> but not everybody proficient enough to know about it.
>
> Please, CC.
> --
> anatoly t.

I don't know Mercurial, but maybe 'svn st -u' would do what you want?