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

Re: How to change default svn-commit.tmp contents

From: Bostjan Skufca <bostjan_at_a2o.si>
Date: Thu, 20 May 2010 12:02:15 +0200

Hi again!

I was wrong about calling the currently checked out revision HEAD. I want to
see diff against currently checked out revision.

I figured out what the problem is. Svn creates svn-commit.tmp one directory
higher than I am currently in.
- /trunk/lib/ <--- this is where I execute "svn ci"
- /trunk/ <--- this is where svn-commit.tmp gets created

Then it executes editor command in that higher directory where
svn-commit.tmp was created. When that command did "svn diff..." part, that
diff also included changes to files outside of lib/ directory (which
reported in diff as changes against past revisions).

I have also checked shell variables but nothing indicates where exactly "svn
ci" was originally run, so I see no way of creating appropriate diff (I
could do some script hacking but that is not elegant anymore). Sigh...

Thank you for your help,
b.

On 20 May 2010 02:53, Daniel Becroft <djcbecroft_at_gmail.com> wrote:

> On Thu, May 20, 2010 at 10:40 AM, Bostjan Skufca <bostjan_at_a2o.si> wrote:
> > I should have known that the first thing to surface would be "why" and
> not
> > "the answer". But your question, Daniel, was polite at least :)
> >
> > If you pay attention to the command line in editor-cmd setting you can
> > notice that content is appended. Therefore it is positioned below the --
> > This line and everything below...
> > There are times when changes to certain files are accumulating over the
> days
> > and when I hit "svn ci" I would like to get a glimpse of those changes.
> Of
> > course you can do it in another terminal, and for larger changesets I
> > definitely do so. But for smaller changesets it is just very convenient
> to
> > see right away what was changed.
>
> Ah, good point. I don't use the command-line to commit, so wasn't aware of
> this.
>
> > Now, the 'update-first' seemed reasonable but it does not solve the
> issue.
> > Will look deeper into it tomorrow.
>
> How did the update-first not solve the issue? What is the diff
> producing and what are you expecting? Is it different or the same as
> running a standard 'svn diff' from the command-line.
>
> As I understand it, the revisions specified in the diff output (ie on
> the '---' and '+++' lines) should be the revision currently checked
> out (ie reported by the 'svn update'). I've never seen (revision HEAD)
> specified in the diff output, since HEAD is continually a moving
> target.
>
> > Thanks for your assistance,
> > b.
> >
> >
> >
> >
> > On 20 May 2010 02:17, Daniel Becroft <djcbecroft_at_gmail.com> wrote:
> >>
> >> On Thu, May 20, 2010 at 10:08 AM, Bostjan Skufca <bostjan_at_a2o.si>
> wrote:
> >> > Hi all!
> >> >
> >> > I would like to change default contents of commit message from 'svn
> >> > status'
> >> > output to add 'svn diff' output. How can this be achieved?
> >> >
> >> > I have already tried setting editor-cmd in ~/.subversion/config to
> "svn
> >> > diff
> >> >>> svn-commit.tmp && mcedit" and it partially works, but creates diff
> >> > against previous revision, not HEAD.
> >> >
> >> > Any suggestions?
> >>
> >> 1) Try running an update first.
> >>
> >> 2) If you're committing a file, and the diff between the working copy
> >> and previous is not identical to the diff between working and HEAD,
> >> that would indicate an out of date working copy, and I would expect
> >> you should get an error.
> >>
> >> 3) Can I ask why you are trying to include the diff in the log message?
> >>
> >> Cheers,
> >> Daniel B.
> >
> >
>
Received on 2010-05-20 12:02:50 CEST

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

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