unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bzr handholding: restoring deleted file
@ 2010-01-08  0:21 Glenn Morris
  2010-01-08  0:45 ` Dan Nicolaescu
       [not found] ` <20100108004050.GB1426@fencepost.localnet>
  0 siblings, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2010-01-08  0:21 UTC (permalink / raw)
  To: emacs-devel


I made a branch with `bzr branch http://...'.

Then I did `rm configure'.

How do I get the damn file back again, like `cvs update' would do?

`bzr update' chirpily says `Tree is up to date'.
`bzr pull' thinks a bit, then says `No revision to pull'.
`bzr merge' fails due to uncommitted changes.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  0:21 bzr handholding: restoring deleted file Glenn Morris
@ 2010-01-08  0:45 ` Dan Nicolaescu
  2010-01-08  0:51   ` Glenn Morris
  2010-01-08  1:11   ` Jason Earl
       [not found] ` <20100108004050.GB1426@fencepost.localnet>
  1 sibling, 2 replies; 15+ messages in thread
From: Dan Nicolaescu @ 2010-01-08  0:45 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

  > I made a branch with `bzr branch http://...'.
  > 
  > Then I did `rm configure'.
  > 
  > How do I get the damn file back again, like `cvs update' would do?
  > 
  > `bzr update' chirpily says `Tree is up to date'.
  > `bzr pull' thinks a bit, then says `No revision to pull'.
  > `bzr merge' fails due to uncommitted changes.

C-x v d RET

it should show the file as missing.  
Put the cursor on it.
C-x v u RET
and you get it back.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
       [not found] ` <20100108004050.GB1426@fencepost.localnet>
@ 2010-01-08  0:50   ` Glenn Morris
  2010-01-08  4:59     ` Jason Rumney
  2010-01-08  9:24     ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2010-01-08  0:50 UTC (permalink / raw)
  To: Marek Aaron Sapota; +Cc: emacs-devel


Marek Aaron Sapota wrote (on Thu, 7 Jan 2010 at 19:40 -0500):

> Use bzr revert configure.

What command can I type to get the equivalent functionality of
`cvs update'? In other words, I want to:

restore any and all deleted files, without me having to list the
individual file names.

merge in any changes from the Emacs repository. If I have any local
uncommitted changes (there will be no local commits in this case) in
the relevant files, I want automatic merging, with conflict markers
and a warning where necessary.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  0:45 ` Dan Nicolaescu
@ 2010-01-08  0:51   ` Glenn Morris
  2010-01-08  0:54     ` Dan Nicolaescu
  2010-01-08  1:11   ` Jason Earl
  1 sibling, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2010-01-08  0:51 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu wrote:

> C-x v d RET
>
> it should show the file as missing.  
> Put the cursor on it.
> C-x v u RET
> and you get it back.

Thanks, but I actually want a non-Emacs solution in this case, because
I want to use it in a script.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  0:51   ` Glenn Morris
@ 2010-01-08  0:54     ` Dan Nicolaescu
  0 siblings, 0 replies; 15+ messages in thread
From: Dan Nicolaescu @ 2010-01-08  0:54 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

  > Dan Nicolaescu wrote:
  > 
  > > C-x v d RET
  > >
  > > it should show the file as missing.  
  > > Put the cursor on it.
  > > C-x v u RET
  > > and you get it back.
  > 
  > Thanks, but I actually want a non-Emacs solution in this case, because
  > I want to use it in a script.

vc-bzr-revert says:
bzr revert configure




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  0:45 ` Dan Nicolaescu
  2010-01-08  0:51   ` Glenn Morris
@ 2010-01-08  1:11   ` Jason Earl
  1 sibling, 0 replies; 15+ messages in thread
From: Jason Earl @ 2010-01-08  1:11 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Glenn Morris <rgm@gnu.org> writes:
>
>   > I made a branch with `bzr branch http://...'.
>   > 
>   > Then I did `rm configure'.
>   > 
>   > How do I get the damn file back again, like `cvs update' would do?
>   > 
>   > `bzr update' chirpily says `Tree is up to date'.
>   > `bzr pull' thinks a bit, then says `No revision to pull'.
>   > `bzr merge' fails due to uncommitted changes.
>
> C-x v d RET
>
> it should show the file as missing.  
> Put the cursor on it.
> C-x v u RET
> and you get it back.

Thanks for this, I really need to learn to use Emacs built in bzr
support.

Alternatively you can always type:

bzr revert

to get all of your changes undone.  Or:

bzr revert foo

to revert just "foo"

"bzr help revert" is quite helpful.  What's more it covers how to use
merge to remove changes made by a certain revision.  I had no idea how
that worked.

Jason




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  0:50   ` Glenn Morris
@ 2010-01-08  4:59     ` Jason Rumney
  2010-01-08 10:38       ` Juanma Barranquero
  2010-01-08  9:24     ` Eli Zaretskii
  1 sibling, 1 reply; 15+ messages in thread
From: Jason Rumney @ 2010-01-08  4:59 UTC (permalink / raw)
  To: emacs-devel

On 08/01/2010 08:50, Glenn Morris wrote:
> What command can I type to get the equivalent functionality of
> `cvs update'? In other words, I want to:
>    

Yes, this is the biggest hurdle I have come across too.  This very basic 
function of a vcs seems unneccessarily complex in the workflow 
proposed.  I have to:

cd emacs/trunk
bzr update
cd ../quickfixes
bzr commit
bzr merge
... resolve conflicts
bzr commit
... continue working

Compared with the CVS case:
cvs update
...resolve conflicts
...continue working





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  0:50   ` Glenn Morris
  2010-01-08  4:59     ` Jason Rumney
@ 2010-01-08  9:24     ` Eli Zaretskii
  2010-01-08 10:42       ` Juanma Barranquero
                         ` (2 more replies)
  1 sibling, 3 replies; 15+ messages in thread
From: Eli Zaretskii @ 2010-01-08  9:24 UTC (permalink / raw)
  To: Glenn Morris; +Cc: maarons, emacs-devel

> Date: Thu, 7 Jan 2010 19:50:57 -0500
> From: Glenn Morris <rgm@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> 
> Marek Aaron Sapota wrote (on Thu, 7 Jan 2010 at 19:40 -0500):
> 
> > Use bzr revert configure.
> 
> What command can I type to get the equivalent functionality of
> `cvs update'? In other words, I want to:
> 
> restore any and all deleted files, without me having to list the
> individual file names.

Does the following trick work?

  bzr revert `bzr deleted`

> merge in any changes from the Emacs repository. If I have any local
> uncommitted changes (there will be no local commits in this case) in
> the relevant files, I want automatic merging, with conflict markers
> and a warning where necessary.

I think

  bzr merge --force

is what you want.  It may even restore the deleted files, but I didn't
try.

Btw, can anyone explain what does "merge --uncommitted" do?  Its
description in the docs is cryptic:

  --uncommitted    Apply uncommitted changes from a working copy, instead
                   of branch changes. 

Huh?




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  4:59     ` Jason Rumney
@ 2010-01-08 10:38       ` Juanma Barranquero
  0 siblings, 0 replies; 15+ messages in thread
From: Juanma Barranquero @ 2010-01-08 10:38 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-devel

On Fri, Jan 8, 2010 at 05:59, Jason Rumney <jasonr@gnu.org> wrote:

> cd emacs/trunk
> bzr update
> cd ../quickfixes
> bzr commit
> bzr merge
> ... resolve conflicts
> bzr commit
> ... continue working

You could use shelve/unshelve and at least not be forced to commit
your changes before merging the trunk.

> Compared with the CVS case:
> cvs update
> ...resolve conflicts
> ...continue working

Well, if your change is really a quickfix, you can do it on the trunk,
and then the same workflow will apply:

  cd emacs/trunk
  ...hack hack hack
  bzr update
  ...resolve conflicts
  bzr commit -m "My quick fix"

though of course that is not recommended if the quickfix is
susceptible of turning into a slowfix with multiple commits.

    Juanma




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  9:24     ` Eli Zaretskii
@ 2010-01-08 10:42       ` Juanma Barranquero
  2010-01-08 12:31         ` Eli Zaretskii
  2010-01-08 17:37       ` Stefan Monnier
  2010-01-08 21:15       ` Glenn Morris
  2 siblings, 1 reply; 15+ messages in thread
From: Juanma Barranquero @ 2010-01-08 10:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: maarons, emacs-devel

On Fri, Jan 8, 2010 at 10:24, Eli Zaretskii <eliz@gnu.org> wrote:

> Btw, can anyone explain what does "merge --uncommitted" do?  Its
> description in the docs is cryptic:
>
>  --uncommitted    Apply uncommitted changes from a working copy, instead
>                   of branch changes.

After

  cd trunk
  bzr merge --uncommitted ../my-branch

the trunk's tree will have the changes that were (and still are) in
my-branch's tree. It's a way to copy uncommitted changes between
trees, instead of the normal merge, which copies committed changes
between branches.

    Juanma




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08 10:42       ` Juanma Barranquero
@ 2010-01-08 12:31         ` Eli Zaretskii
  2010-01-08 13:09           ` Juanma Barranquero
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2010-01-08 12:31 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: maarons, emacs-devel

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Fri, 8 Jan 2010 11:42:30 +0100
> Cc: Glenn Morris <rgm@gnu.org>, maarons@gnu.org, emacs-devel@gnu.org
> 
> On Fri, Jan 8, 2010 at 10:24, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > Btw, can anyone explain what does "merge --uncommitted" do?  Its
> > description in the docs is cryptic:
> >
> >  --uncommitted    Apply uncommitted changes from a working copy, instead
> >                   of branch changes.
> 
> After
> 
>   cd trunk
>   bzr merge --uncommitted ../my-branch
> 
> the trunk's tree will have the changes that were (and still are) in
> my-branch's tree. It's a way to copy uncommitted changes between
> trees, instead of the normal merge, which copies committed changes
> between branches.

So it's a way of merging with modified files from the named branch,
without naming those files explicitly?





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08 12:31         ` Eli Zaretskii
@ 2010-01-08 13:09           ` Juanma Barranquero
  0 siblings, 0 replies; 15+ messages in thread
From: Juanma Barranquero @ 2010-01-08 13:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: maarons, emacs-devel

On Fri, Jan 8, 2010 at 13:31, Eli Zaretskii <eliz@gnu.org> wrote:

> So it's a way of merging with modified files from the named branch,
> without naming those files explicitly?

Yes.

    Juanma




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  9:24     ` Eli Zaretskii
  2010-01-08 10:42       ` Juanma Barranquero
@ 2010-01-08 17:37       ` Stefan Monnier
  2010-01-08 19:29         ` Eli Zaretskii
  2010-01-08 21:15       ` Glenn Morris
  2 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2010-01-08 17:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: maarons, emacs-devel

> I think
>   bzr merge --force
> is what you want.

BTW, I recommend people stay away from it, not because it's inherently
nasty, but because it's poorly supported (because Bzr developpers don't
consider it an important case to handle well).


        Stefan




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08 17:37       ` Stefan Monnier
@ 2010-01-08 19:29         ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2010-01-08 19:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: maarons, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Glenn Morris <rgm@gnu.org>, maarons@gnu.org, emacs-devel@gnu.org
> Date: Fri, 08 Jan 2010 12:37:33 -0500
> 
> > I think
> >   bzr merge --force
> > is what you want.
> 
> BTW, I recommend people stay away from it, not because it's inherently
> nasty, but because it's poorly supported (because Bzr developpers don't
> consider it an important case to handle well).

If it indeed does what Glenn wanted, he will have hard time staying
away from it ;-)




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: bzr handholding: restoring deleted file
  2010-01-08  9:24     ` Eli Zaretskii
  2010-01-08 10:42       ` Juanma Barranquero
  2010-01-08 17:37       ` Stefan Monnier
@ 2010-01-08 21:15       ` Glenn Morris
  2 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2010-01-08 21:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: maarons, emacs-devel

Eli Zaretskii wrote:

> Does the following trick work?
>
>   bzr revert `bzr deleted`

Yes.

> I think
>
>   bzr merge --force
>
> is what you want.  It may even restore the deleted files, but I didn't
> try.

No, it doesn't restore any deleted files.

So I guess this means there is no direct analogy for `cvs/svn update'.
Which is fine and I can understand why (deleting counts as a local
change, like modifying a file). But it would have been nicer to have
it more prominently explained, as requested in

https://bugs.launchpad.net/bzr/+bug/191466

Anyway, the real lesson here is that in place of:

rm foo
cvs up foo

I should use

bzr revert --no-backup foo




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-01-08 21:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08  0:21 bzr handholding: restoring deleted file Glenn Morris
2010-01-08  0:45 ` Dan Nicolaescu
2010-01-08  0:51   ` Glenn Morris
2010-01-08  0:54     ` Dan Nicolaescu
2010-01-08  1:11   ` Jason Earl
     [not found] ` <20100108004050.GB1426@fencepost.localnet>
2010-01-08  0:50   ` Glenn Morris
2010-01-08  4:59     ` Jason Rumney
2010-01-08 10:38       ` Juanma Barranquero
2010-01-08  9:24     ` Eli Zaretskii
2010-01-08 10:42       ` Juanma Barranquero
2010-01-08 12:31         ` Eli Zaretskii
2010-01-08 13:09           ` Juanma Barranquero
2010-01-08 17:37       ` Stefan Monnier
2010-01-08 19:29         ` Eli Zaretskii
2010-01-08 21:15       ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).