Open Bug 1242323 Opened 8 years ago Updated 8 years ago

Make |hg push-to-try| accept an optional -r REV parameter to specify changeset to push

Categories

(Developer Services :: Mercurial: mozext, defect)

defect
Not set
normal

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: nalexander, Assigned: nalexander)

Details

Attachments

(1 file)

It's irritating that |hg push-to-try| doesn't accept a parameter specifying the revision to push in the same way that |hg push| does.
I would like to test this, but I'm not sure how to run the tests locally.  They look like cram tests, but:

nalexander@chocho ~/.m/v/h/p/tests> cram test-clean-push.t
!
--- test-clean-push.t
+++ test-clean-push.t.err
@@ -8,6 +8,8 @@
   > [defaults]
   > diff = --nodate
   > EOF
+  /bin/sh: line 3: $HGRCPATH: ambiguous redirect
+  [1]

   $ hg init remote

@@ -21,15 +23,8 @@
   $ hg commit -m "file1.txt added"

   $ hg push-to-try -m 'try: syntax' -s ../remote
-  Creating temporary commit for remote...
-  pushing to ../remote
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 1 changes to 1 files
-  push complete
-  temporary commit removed, repository restored
+  hg: parse error: empty query
+  [255]

   $ hg verify
   checking changesets
@@ -42,18 +37,8 @@

   $ cd ../remote
   $ hg log
-  changeset:   1:c5fa4c037d42
-  tag:         tip
-  user:        test
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     try: syntax
-
-  changeset:   0:153ffc71bd76
-  user:        test
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     file1.txt added
-

   $ hg up -r 1
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  abort: unknown revision '1'!
+  [255]
   $ hg diff -r 0

# Ran 1 tests, 0 skipped, 1 failed.
Comment on attachment 8711542 [details]
MozReview Request: mozext: add optional -r REV to push-to-try extension (bug 1242323); r?gps

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/32229/diff/1-2/
To run the tests:

$ ./create-test-environment
$ ./run-tests hgext/push-to-try
Attachment #8711542 - Flags: review?(gps) → review+
Comment on attachment 8711542 [details]
MozReview Request: mozext: add optional -r REV to push-to-try extension (bug 1242323); r?gps

https://reviewboard.mozilla.org/r/32229/#review29853

A test would be nice.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: