4

It's not uncommon for me to record a patch, pull it into my staging branch and then realize I've done something small and silly like a typo in a logging message, or something similarly trivial which doesn't require (to my mind) a whole new patch.

In these instances, I've been using:

darcs amend-record

To update the patch. But when I re-pull darcs will treat the patches as conflicting, so I end up having to unrecord and revert the patch in the staging branch, and then pull it again.

Is there a darcs command or option that will allow me to more simply pull an amended patch?

Dana
  • 32,083
  • 17
  • 62
  • 73

2 Answers2

5

Not really. Amending a patch makes it into a different patch, even though the name is the same as before. amend-record is normally used only in the local repo, before the patch has been pushed/pulled elsewhere. If the patch has been pushed to other repos, you'll need to obliterate it in those, and re-pull the amended version. (obliterate is the modern spelling of "unpull").

Alternately, use the rollback command; this is more friendly when the repos in question are public and used by multiple developers.

Simon Michael
  • 2,278
  • 1
  • 18
  • 21
  • This seems to be even more difficult if you want to sync a remote repo (like on ), which you usually push to. Say, if it's not a single patch, then how do you easily make the remote repo obliterate all patches that are not in a certain local one? (To be done before pushing the amended patches.) I'm thinking that one of the ways would be to put a copy of new local repo on the web, and `ssh HUB obliterate` with some options referring to the new copy which make it select the patches not in the reference repo... – imz -- Ivan Zakharyaschev Jan 08 '16 at 00:14
3

You could try first running darcs unpull on the staging branch then pulling in the amended patch.

drewrichards
  • 583
  • 4
  • 7