You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Sam Washburn <sw...@inovationeering.com> on 2008/05/24 05:00:45 UTC

FEATURE: Something like a 'svn rebuild'

Ok,

Ryan Schmidt from the users list helped me track down the problem which
apparently was that, somehow the pristine version of my local copy was
updated, but not the repository.  I'm not sure what caused this perhaps it
was my then shaky net connection.

His recommendation to me was to checkout a fresh copy and manually merge in
the changes.  Fortunately, this is not a big deal since there were only a
couple of small files our of sync.

So, my feature recommendation would be something like a 'svn rebuild'
command that would re-download and recreate all the .svn dirs and files
inside of the working copy *without* modifying anything outside of the .svn
(i.e. any local changes).

The resulting rebuild would look as if someone checked out a fresh copy and
manually made the changes.  Files on the repo that are missing from the
working copy would be marked as missing, and files on the working copy which
are missing from the repo would be marked as unversioned.

What do you think?

Sam


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Karl Fogel <kf...@red-bean.com>.
"Sam Washburn" <sw...@inovationeering.com> writes:
> It doesn't even need to schedule it for deletion, just mark it missing.  But
> it should not download a new copy.  The key is fixing the pristine copy and
> svn can then report the differences as it usually does
>
> I don't think it should be that difficult to implement.  Even
> the --metadata-only idea Alan had would be fine.  Which, I guess would be
> excluding a piece of code instead of writing something.
>
> Yes, it can happen in many other circumstances than just a fluke networking
> issue.  "Listman" mentioned broken tools.  That happens frequently for us
> too.
>
> And, imho, it seems a lot more professional for the project to say "run svn
> rebuild" rather than "first delete all your .svn files..."
>
> Well, thanks for considering it.  I really like svn.  I know others have bad
> things to say about cvs and svn due to frustrating experiences like mine,
> and maybe this would be a step closer to winning them over.

I think we're all in favor of a script to do this.  Adding a new
subcommand to svn itself, however, is a large user interface burden, so
we're usually pretty conservative about adding new subcommands.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: FEATURE: Something like a 'svn rebuild'

Posted by Sam Washburn <sw...@inovationeering.com>.
It doesn't even need to schedule it for deletion, just mark it missing.  But
it should not download a new copy.  The key is fixing the pristine copy and
svn can then report the differences as it usually does

I don't think it should be that difficult to implement.  Even
the --metadata-only idea Alan had would be fine.  Which, I guess would be
excluding a piece of code instead of writing something.

Yes, it can happen in many other circumstances than just a fluke networking
issue.  "Listman" mentioned broken tools.  That happens frequently for us
too.

And, imho, it seems a lot more professional for the project to say "run svn
rebuild" rather than "first delete all your .svn files..."

Well, thanks for considering it.  I really like svn.  I know others have bad
things to say about cvs and svn due to frustrating experiences like mine,
and maybe this would be a step closer to winning them over.

Sam

-----Original Message-----
From: Karl Fogel [mailto:kfogel@red-bean.com]
Sent: Saturday, May 24, 2008 12:24 PM
To: Mark Phippard
Cc: dev@subversion.tigris.org; Sam Washburn
Subject: Re: FEATURE: Something like a 'svn rebuild'


"Mark Phippard" <ma...@gmail.com> writes:
> SVN 1.5 has a feature that gets you most the way there:
>
> svn checkout --force
>
> It does exactly what is asked for, with the exception that I suspect
> you should delete all of the .svn folders before running it.

I think it doesn't quite do what the OP wants.

With 'svn checkout --force', if a file is absent in the original
(non-versioned) tree, then checkout will simply replace it.  But I think
the OP wants that file to be absent and scheduled for deletion after a
"rebuild".

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Karl Fogel <kf...@red-bean.com>.
"Mark Phippard" <ma...@gmail.com> writes:
> SVN 1.5 has a feature that gets you most the way there:
>
> svn checkout --force
>
> It does exactly what is asked for, with the exception that I suspect
> you should delete all of the .svn folders before running it.

I think it doesn't quite do what the OP wants.

With 'svn checkout --force', if a file is absent in the original
(non-versioned) tree, then checkout will simply replace it.  But I think
the OP wants that file to be absent and scheduled for deletion after a
"rebuild".

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Julian Foad <ju...@btopenworld.com>.
Martin Furter wrote:
[...]
> Is there a reason that only about 5 help texts are checked?

Yes: the purpose of the tests is not to check that the help text says something 
in particular, but to check that the mechanisms for parsing command-line 
options, requesting help, etc. still work.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Martin Furter <mf...@rola.ch>.

On Tue, 27 May 2008, Martin Furter wrote:

>
>
> On Mon, 26 May 2008, Daniel Shahaf wrote:
>
>> Daniel Shahaf wrote on Mon, 26 May 2008 at 22:27 +0300:
>>> Martin Furter wrote on Mon, 26 May 2008 at 20:54 +0200:
>>>> 
>>>> Maybe something like this should be added:
>>>> 
>>>> [[[
>>>> Add a note to the help texts of checkout and switch about where to find 
>>>> the
>>>> action characters.
>>>> 
>>>> * subversion/svn/main.c
>>>>   (svn_cl__cmd_table."checkout"): Add 'see also update' note.
>>>>   (svn_cl__cmd_table."switch"):   Dito.
>>>> ]]]
>>>> 
>>> 
>>> Sure, +1.  Just s//Ditto/ in the log message.
>>> 
>> 
>> Before you commit, remember to tweak the expected help texts in the test
>> suite.

Is there a reason that only about 5 help texts are checked?

> OK.
>
> That means I have to run the tests and I have to setup that first.
> I'll need some time to get that running again...

All tests passed.

Committed in r31487.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Martin Furter <mf...@rola.ch>.

On Mon, 26 May 2008, Daniel Shahaf wrote:

> Daniel Shahaf wrote on Mon, 26 May 2008 at 22:27 +0300:
>> Martin Furter wrote on Mon, 26 May 2008 at 20:54 +0200:
>>>
>>> Maybe something like this should be added:
>>>
>>> [[[
>>> Add a note to the help texts of checkout and switch about where to find the
>>> action characters.
>>>
>>> * subversion/svn/main.c
>>>   (svn_cl__cmd_table."checkout"): Add 'see also update' note.
>>>   (svn_cl__cmd_table."switch"):   Dito.
>>> ]]]
>>>
>>
>> Sure, +1.  Just s//Ditto/ in the log message.
>>
>
> Before you commit, remember to tweak the expected help texts in the test
> suite.

OK.

That means I have to run the tests and I have to setup that first.
I'll need some time to get that running again...

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Daniel Shahaf <d....@daniel.shahaf.co.il>.
Daniel Shahaf wrote on Mon, 26 May 2008 at 22:27 +0300:
> Martin Furter wrote on Mon, 26 May 2008 at 20:54 +0200:
> > 
> > Maybe something like this should be added:
> > 
> > [[[
> > Add a note to the help texts of checkout and switch about where to find the
> > action characters.
> > 
> > * subversion/svn/main.c
> >   (svn_cl__cmd_table."checkout"): Add 'see also update' note.
> >   (svn_cl__cmd_table."switch"):   Dito.
> > ]]]
> > 
> 
> Sure, +1.  Just s//Ditto/ in the log message.
> 

Before you commit, remember to tweak the expected help texts in the test 
suite.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Daniel Shahaf <d....@daniel.shahaf.co.il>.
Martin Furter wrote on Mon, 26 May 2008 at 20:54 +0200:
> 
> Maybe something like this should be added:
> 
> [[[
> Add a note to the help texts of checkout and switch about where to find the
> action characters.
> 
> * subversion/svn/main.c
>   (svn_cl__cmd_table."checkout"): Add 'see also update' note.
>   (svn_cl__cmd_table."switch"):   Dito.
> ]]]
> 

Sure, +1.  Just s//Ditto/ in the log message.

Daniel

> Index: subversion/svn/main.c
> ===================================================================
> --- subversion/svn/main.c       (revision 31453)
> +++ subversion/svn/main.c       (working copy)
> @@ -373,7 +373,10 @@
>       "  become versioned.  For files, any content differences between the\n"
>       "  obstruction and the repository are treated like a local
> modification\n"
>       "  to the working copy.  All properties from the repository are
> applied\n"
> -     "  to the obstructing path.\n"),
> +     "  to the obstructing path.\n"
> +     "\n"
> +     "  See also 'svn help update' for a list of possible characters\n"
> +     "  reporting the action taken.\n"),
>      {'r', 'q', 'N', opt_depth, opt_force, opt_ignore_externals} },
> 
>    { "cleanup", svn_cl__cleanup, {0}, N_
> @@ -924,7 +927,10 @@
>       "  2. Rewrite working copy URL metadata to reflect a syntactic change
> only.\n"
>       "     This is used when repository's root URL changes (such as a
> scheme\n"
>       "     or hostname change) but your working copy still reflects the
> same\n"
> -    "     directory within the same repository.\n"),
> +     "     directory within the same repository.\n"
> +     "\n"
> +     "  See also 'svn help update' for a list of possible characters\n"
> +     "  reporting the action taken.\n"),
>      { 'r', 'N', opt_depth, opt_set_depth, 'q', opt_merge_cmd, opt_relocate,
>        opt_ignore_externals, opt_force, opt_accept} },
> 
> 
> 
> On Mon, 26 May 2008, Senthil Kumaran S wrote:
> 
> > Daniel Shahaf wrote:
> > > It's in the help for 'svn update'.    Not the most obvious place:  I had
> > > to grep subversion/svn/main.c to find this.  (I tried 'svn help checkout'
> > > and 'svn help status', but it wasn't there.)
> > 
> > Yeah, even I tried help of 'svn co' and 'svn st'. Anyway thanks for the info
> > :)
> > 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Martin Furter <mf...@rola.ch>.
Maybe something like this should be added:

[[[
Add a note to the help texts of checkout and switch about where to find 
the action characters.

* subversion/svn/main.c
   (svn_cl__cmd_table."checkout"): Add 'see also update' note.
   (svn_cl__cmd_table."switch"):   Dito.
]]]

Index: subversion/svn/main.c
===================================================================
--- subversion/svn/main.c       (revision 31453)
+++ subversion/svn/main.c       (working copy)
@@ -373,7 +373,10 @@
       "  become versioned.  For files, any content differences between the\n"
       "  obstruction and the repository are treated like a local modification\n"
       "  to the working copy.  All properties from the repository are applied\n"
-     "  to the obstructing path.\n"),
+     "  to the obstructing path.\n"
+     "\n"
+     "  See also 'svn help update' for a list of possible characters\n"
+     "  reporting the action taken.\n"),
      {'r', 'q', 'N', opt_depth, opt_force, opt_ignore_externals} },

    { "cleanup", svn_cl__cleanup, {0}, N_
@@ -924,7 +927,10 @@
       "  2. Rewrite working copy URL metadata to reflect a syntactic change only.\n"
       "     This is used when repository's root URL changes (such as a scheme\n"
       "     or hostname change) but your working copy still reflects the same\n"
-    "     directory within the same repository.\n"),
+     "     directory within the same repository.\n"
+     "\n"
+     "  See also 'svn help update' for a list of possible characters\n"
+     "  reporting the action taken.\n"),
      { 'r', 'N', opt_depth, opt_set_depth, 'q', opt_merge_cmd, opt_relocate,
        opt_ignore_externals, opt_force, opt_accept} },



On Mon, 26 May 2008, Senthil Kumaran S wrote:

> Daniel Shahaf wrote:
>> It's in the help for 'svn update'.    Not the most obvious place:  I had
>> to grep subversion/svn/main.c to find this.  (I tried 'svn help checkout'
>> and 'svn help status', but it wasn't there.)
>
> Yeah, even I tried help of 'svn co' and 'svn st'. Anyway thanks for the info 
> :)
>
> -- 
> Senthil Kumaran S
> http://www.stylesen.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Senthil Kumaran S <se...@collab.net>.
Daniel Shahaf wrote:
> It's in the help for 'svn update'.    Not the most obvious place:  I had
> to grep subversion/svn/main.c to find this.  (I tried 'svn help checkout'
> and 'svn help status', but it wasn't there.)

Yeah, even I tried help of 'svn co' and 'svn st'. Anyway thanks for the info :)

-- 
Senthil Kumaran S
http://www.stylesen.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Daniel Shahaf <d....@daniel.shahaf.co.il>.
Senthil Kumaran S wrote on Mon, 26 May 2008 at 12:29 +0530:
> Mark Phippard wrote:
> > SVN 1.5 has a feature that gets you most the way there:
> > 
> > svn checkout --force
> > 
> > It does exactly what is asked for, with the exception that I suspect
> > you should delete all of the .svn folders before running it.
> 
> I tried the above and got the following result:
> 
> <snip>
> $ svn co file:///tmp/repos wc --force
> E    wc/trunk
> A    wc/trunk/file1
> E    wc/trunk/file2
> E    wc/trunk/file3
> E    wc/branches
> E    wc/tags
> Checked out revision 4.
> </snip>
> 
> I do not know what 'E' stands for. Is it documented somewhere? I could not see
> that in the svnbook too. Or am I missing something?
> 
> 

It means 'E'xisted.

It's in the help for 'svn update'.    Not the most obvious place:  I had
to grep subversion/svn/main.c to find this.  (I tried 'svn help checkout'
and 'svn help status', but it wasn't there.)

Daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Senthil Kumaran S <se...@collab.net>.
Mark Phippard wrote:
> SVN 1.5 has a feature that gets you most the way there:
> 
> svn checkout --force
> 
> It does exactly what is asked for, with the exception that I suspect
> you should delete all of the .svn folders before running it.

I tried the above and got the following result:

<snip>
$ svn co file:///tmp/repos wc --force
E    wc/trunk
A    wc/trunk/file1
E    wc/trunk/file2
E    wc/trunk/file3
E    wc/branches
E    wc/tags
Checked out revision 4.
</snip>

I do not know what 'E' stands for. Is it documented somewhere? I could not see 
that in the svnbook too. Or am I missing something?

-- 
Senthil Kumaran S
http://www.stylesen.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Mark Phippard <ma...@gmail.com>.
On Sat, May 24, 2008 at 12:16 PM, Karl Fogel <kf...@red-bean.com> wrote:
> "Sam Washburn" <sw...@inovationeering.com> writes:
>> Ryan Schmidt from the users list helped me track down the problem which
>> apparently was that, somehow the pristine version of my local copy was
>> updated, but not the repository.  I'm not sure what caused this perhaps it
>> was my then shaky net connection.
>>
>> His recommendation to me was to checkout a fresh copy and manually merge in
>> the changes.  Fortunately, this is not a big deal since there were only a
>> couple of small files our of sync.
>
> Well, would it have been a big deal if there were many files out of
> sync?  It's a very scriptable task.
>
>> So, my feature recommendation would be something like a 'svn rebuild'
>> command that would re-download and recreate all the .svn dirs and files
>> inside of the working copy *without* modifying anything outside of the .svn
>> (i.e. any local changes).
>>
>> The resulting rebuild would look as if someone checked out a fresh copy and
>> manually made the changes.  Files on the repo that are missing from the
>> working copy would be marked as missing, and files on the working copy which
>> are missing from the repo would be marked as unversioned.
>>
>> What do you think?
>
> We could put it in svn, but I'm not sure how often the situation comes
> up, and it's pretty easy to script when needed...

I meant to respond to this.

SVN 1.5 has a feature that gets you most the way there:

svn checkout --force

It does exactly what is asked for, with the exception that I suspect
you should delete all of the .svn folders before running it.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Listman <li...@burble.net>.
On May 25, 2008, at 9:12 PM- May 25, 2008, Karl Fogel wrote:

> Talden <ta...@gmail.com> writes:
>> To me, this feels like something that should be available to every
>> user should they need to repair their WC though.
>>
>> Requiring that all users must have scripting engine X installed in
>> addition to Subversion doesn't seem ideal.
>
> We have no data on how often this comes up, and IIRC have received few
> posts about it.  It's hard to justify a new core feature based on  
> that.
>
> If we try to make as many of our contrib scripts be in (say) Python as
> possible, then at least once a user installs Python for any script,
> it'll be installed for many other scripts they might need in the  
> future.

my company experiences this a lot. working copies get broken  
regularly, usually by some other misbehaving tool writing into the  
managed dir and corrupting the .svn metadata. a way to rebuild the  
broken meta-data (without losing any local modifications) would really  
help in this situation.

the kinds of issues we see regularly are:

- orphaned locks - a file not locked in the WC but locked in the depot  
(with only 1 WC)

- trashed .svn dirs - we find the .svn dir gets set to zerolength file  
by certain unsociable tools..




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Karl Fogel <kf...@red-bean.com>.
Talden <ta...@gmail.com> writes:
> To me, this feels like something that should be available to every
> user should they need to repair their WC though.
>
> Requiring that all users must have scripting engine X installed in
> addition to Subversion doesn't seem ideal.

We have no data on how often this comes up, and IIRC have received few
posts about it.  It's hard to justify a new core feature based on that.

If we try to make as many of our contrib scripts be in (say) Python as
possible, then at least once a user installs Python for any script,
it'll be installed for many other scripts they might need in the future.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Talden <ta...@gmail.com>.
>>> Well, would it have been a big deal if there were many files out of
>>> sync?  It's a very scriptable task.
>>
>> Keep in mind that a fair representation of Subversion users don't know
>> how to 'script' anything and, of course, some platforms provide an
>> stronger scripting solution than others.
>>
>> I think this is an excellent suggestion as it provides a means of
>> repairing a wedged WC which does happen occasionally.
>
> I just mean that this would make more sense as a script that we ship in
> contrib/, rather than as yet another subcommand in 'svn'.  If the OP
> wants to write that script, great; if someone else wants to write it,
> also great.  It's an easy script, for those familiar with scripting.
> We don't have to build everything into the core code :-).

To me, this feels like something that should be available to every
user should they need to repair their WC though.

Requiring that all users must have scripting engine X installed in
addition to Subversion doesn't seem ideal.

--
Talden

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Karl Fogel <kf...@red-bean.com>.
Talden <ta...@gmail.com> writes:
>> Well, would it have been a big deal if there were many files out of
>> sync?  It's a very scriptable task.
>
> Keep in mind that a fair representation of Subversion users don't know
> how to 'script' anything and, of course, some platforms provide an
> stronger scripting solution than others.
>
> I think this is an excellent suggestion as it provides a means of
> repairing a wedged WC which does happen occasionally.

I just mean that this would make more sense as a script that we ship in
contrib/, rather than as yet another subcommand in 'svn'.  If the OP
wants to write that script, great; if someone else wants to write it,
also great.  It's an easy script, for those familiar with scripting.
We don't have to build everything into the core code :-).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Talden <ta...@gmail.com>.
>> Ryan Schmidt from the users list helped me track down the problem which
>> apparently was that, somehow the pristine version of my local copy was
>> updated, but not the repository.  I'm not sure what caused this perhaps it
>> was my then shaky net connection.
>>
>> His recommendation to me was to checkout a fresh copy and manually merge in
>> the changes.  Fortunately, this is not a big deal since there were only a
>> couple of small files our of sync.
>
> Well, would it have been a big deal if there were many files out of
> sync?  It's a very scriptable task.

Keep in mind that a fair representation of Subversion users don't know
how to 'script' anything and, of course, some platforms provide an
stronger scripting solution than others.

I think this is an excellent suggestion as it provides a means of
repairing a wedged WC which does happen occasionally.

I can imagine you have the following issues.

* Since you aren't updating the content, but instead only rewriting
the WC metadata you must be able to ascertain the correct revision (or
be told which revision).

* You would want to be able to specify whether new files should be
scheduled for addition and/or missing files scheduled for removal.
You may not always want rebuild to do this as these files may be
copies or renames.

Any other issues springing to mind?

--
Talden

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Karl Fogel <kf...@red-bean.com>.
"Sam Washburn" <sw...@inovationeering.com> writes:
> Ryan Schmidt from the users list helped me track down the problem which
> apparently was that, somehow the pristine version of my local copy was
> updated, but not the repository.  I'm not sure what caused this perhaps it
> was my then shaky net connection.
>
> His recommendation to me was to checkout a fresh copy and manually merge in
> the changes.  Fortunately, this is not a big deal since there were only a
> couple of small files our of sync.

Well, would it have been a big deal if there were many files out of
sync?  It's a very scriptable task.

> So, my feature recommendation would be something like a 'svn rebuild'
> command that would re-download and recreate all the .svn dirs and files
> inside of the working copy *without* modifying anything outside of the .svn
> (i.e. any local changes).
>
> The resulting rebuild would look as if someone checked out a fresh copy and
> manually made the changes.  Files on the repo that are missing from the
> working copy would be marked as missing, and files on the working copy which
> are missing from the repo would be marked as unversioned.
>
> What do you think?

We could put it in svn, but I'm not sure how often the situation comes
up, and it's pretty easy to script when needed...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FEATURE: Something like a 'svn rebuild'

Posted by Alan Barrett <ap...@cequrux.com>.
On Sat, 24 May 2008, Sam Washburn wrote:
> So, my feature recommendation would be something like a 'svn rebuild'
> command that would re-download and recreate all the .svn dirs and files
> inside of the working copy *without* modifying anything outside of the .svn
> (i.e. any local changes).

I'd much prefer a --metadata-only option, which would work with ~all
svn commands, and which would mean "do the usual stuff to the .svn
directories and files inside them, but do not touch anything outside the
.svn directories".  The your "svn rebuild" idea could be implemented
by removing all .svn dirs, followed by "svn checkout --metadata-only
[-rREV] URL".

I find that I often want "svn checkout --metadata-only" (to take
something that looks a lot like the output from "svn export", except
with local changes, and convert it into a proper working copy with
local changes).  I also sometimes want "svn update --metadata-only
[-rREV] FILENAME" (when I know or suspect that the local changes are
very similar to changes made in the repository).  I tend to fake them by
moving .svn directories back and forth between the directory that I care
about and a temporary working copy.

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org