You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Yakov Lerner <il...@gmail.com> on 2008/04/29 06:29:08 UTC

how to artificially create local "Conflicted" state ?

How can I artificially create the local "Conflict" state on the working file,
without doing any checkins on any computer ? Sort of opposite to
'svn resolved'. How ?

The purpose is to prevent accidental checkin of temporary/debugging
changes in the file. Attempt to checkin should cause svn error, just like
attempt to checkin the file in Conflicted state is refused.

Thanks
Yakov

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

RE: Re: how to artificially create local "Conflicted" state ?

Posted by John Niven <jn...@bravurasolutions.com>.
> -----Original Message-----
> From: Yakov Lerner [mailto:iler.ml@gmail.com] 
> Sent: Tuesday, 29 April 2008 19:20
> To: users@subversion.tigris.org; Puneet Lakhina
> Subject: Re: how to artificially create local "Conflicted" state ?
> 
> > > How can I artificially create the local "Conflict" state on the 
> > > working
> > file,
> > > without doing any checkins on any computer ? Sort of opposite to 
> > > 'svn resolved'. How ?

> > I dont think there is a direct way of doing it. This would involve 
> > some sort of a hack by modifying .svn/entries file for this 
> particular 
> > directory. In conflicted state the entries file contains 
> entries for  
> > filename.rPREV filename.rHEAD and filename.mine
> > >
> > > The purpose is to prevent accidental checkin of 
> temporary/debugging 
> > > changes in the file. Attempt to checkin should cause svn 
> error, just 
> > > like attempt to checkin the file in Conflicted state is refused.
> > >
> In Linux/Unix, I do have a solution for protecting from 
> accidental checkin -- I make local file to a become symlink 
> -- then 'svn ci' dies with "Special state changed" error.
> That's nice trick.
> 
> But On Windows  .. on windows I am still searching for the solution.
> 
> The hacking the .svn/entries you mentioned looks promising, 
> I'll investigate it.

I'm surprised other people haven't haven't cautioned you about hacking
/svn/entries, but it sounds like a horrible way to quickly mess up your
working copy.

Another approach might be to have a pre-commit hook that checked for the
existence of a certain string, and blocked the commit if the string was
present in a file.  Then you could add the string to the beginning of
any file you were debugging, something like
"//__DEBUGGING__DO_NOT_COMMIT__".  Human- and machine-readable, so very
clear to anyone what it does.  You'd possibly want to have the hook
script only check the first line of each file, so as not to slow down
commits too much.

Hope that helps
John

> 
> Thanks
> Yakov
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 

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


Re: how to artificially create local "Conflicted" state ?

Posted by Yakov Lerner <il...@gmail.com>.
On Tue, Apr 29, 2008 at 9:05 AM, Puneet Lakhina
<pu...@gmail.com> wrote:
>
>
>
> On Tue, Apr 29, 2008 at 11:59 AM, Yakov Lerner <il...@gmail.com> wrote:
> > How can I artificially create the local "Conflict" state on the working
> file,
> > without doing any checkins on any computer ? Sort of opposite to
> > 'svn resolved'. How ?
> >
>
> I dont think there is a direct way of doing it. This would involve some sort
> of a hack by modifying .svn/entries file for this particular directory. In
> conflicted state the entries file contains entries for
>  filename.rPREV
> filename.rHEAD and
> filename.mine
>
>
> >
> > The purpose is to prevent accidental checkin of temporary/debugging
> > changes in the file. Attempt to checkin should cause svn error, just like
> > attempt to checkin the file in Conflicted state is refused.
> >
>
> Are you looking for this:
> http://subversion.tigris.org/faq.html#ignore-commit

I am sure 'ignore-commit' trick is suitable for certain users.

For me, it is not suitable for me at all: The file in question is
under VC, and it is not an option to remove it from VC.

In Linux/Unix, I do have a solution for protecting from accidental checkin --
I make local file to a become symlink -- then 'svn ci' dies with
"Special state changed" error.
That's nice trick.

But On Windows  .. on windows I am still searching for the solution.

The hacking the .svn/entries you mentioned looks promising, I'll investigate it.

Thanks
Yakov

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

Re: how to artificially create local "Conflicted" state ?

Posted by Puneet Lakhina <pu...@gmail.com>.
On Tue, Apr 29, 2008 at 11:59 AM, Yakov Lerner <il...@gmail.com> wrote:

> How can I artificially create the local "Conflict" state on the working
> file,
> without doing any checkins on any computer ? Sort of opposite to
> 'svn resolved'. How ?
>

I dont think there is a direct way of doing it. This would involve some sort
of a hack by modifying .svn/entries file for this particular directory. In
conflicted state the entries file contains entries for
filename.rPREV
filename.rHEAD and
filename.mine


> The purpose is to prevent accidental checkin of temporary/debugging
> changes in the file. Attempt to checkin should cause svn error, just like
> attempt to checkin the file in Conflicted state is refused.
>

Are you looking for this:
http://subversion.tigris.org/faq.html#ignore-commit


>
> Thanks
> Yakov
>

-- 
Puneet
http://sahyog.blogspot.com/
Latest Post: javac -g