---
name: "mercurial-importorig"
section: "1"
platform: "linux"
package: "mercurial-buildpackage"
version: "0.10.2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/mercurial-importorig"
---

# mercurial-importorig(1)

Import upstream source code tarballs into .deb package Mercurial repository.

## NAME

mercurial-importorig - Import upstream source code tarballs into .deb package Mercurial repository.

## SYNOPSIS

**mercurial-importorig** \[*option*\] ... *tarball* \[*tarball*\] ...

## DESCRIPTION

Import upstream source tarballs into a Mercurial repository.  The first tarball must be the main tarball, see [**dpkg-source**(1)](/dpkg-source/1.md).  The upstream sources are incorporated into the upstream branch, and merged into the default branch.  It is possible to use **mercurial-importorig** multiple times to import several versions, but the versions must be imported sequentially starting with the earliest version.

For [**dpkg-source**(1)](/dpkg-source/1.md) format 3.0 (quilt), all patches are removed before the import, and you must manually reapply and refresh the patches.  Finally you must commit the fully patched source, including the .pc directory.

## OPTIONS

**--version**, **-V**

-

  Output version and exit.

**--verbose**, **-v**

-

  Increase verbosity level.  Can be used several times.

**--no-merge**, **-n**

-

  Do not merge imported upstream source into the default branch.  A manual **hg merge upstream** will then have to be done at a later stage. Remember to unapply all patches before the merge.

## EXAMPLES

**mercurial-importorig** ../mypack\_1.2.orig.tar.bz2 ../mypack\_1.2.orig-plugin.tar.gz

-

  Import upstream source from two tarballs into the repository in the current directory, which requires the package to be in dpkg source package format 3.0 (quilt), see [**dpkg-source**(1)](/dpkg-source/1.md).  After the import, both the upstream and default branch will have the tag mypack\_1.2.

## AUTHOR

Jens Peter Secher \<jpsecher@gmail.com\>

## THANKS

The ideas for this package originates from John Goerzen's **hg-buildpackage**.

## SEE ALSO

[**mercurial-importdsc**(1)](/mercurial-importdsc/1.md), [**mercurial-buildpackage**(1)](/mercurial-buildpackage/1.md), [**mercurial-tagversion**(1)](/mercurial-tagversion/1.md), [**mercurial-pristinetar**(1)](/mercurial-pristinetar/1.md), [**mercurial-port**(1)](/mercurial-port/1.md).
